朝凱 asked in 電腦與網際網路軟體 · 1 decade ago

請問oracle有無更改欄位名稱的語法?

我是剛學oracle的新手,因為有時在創建表格實會不小心將欄位名稱打錯,所以想詢問一下oracle有沒有直接更改表格欄位名稱的語法@.@?

我是用oracle 10g-release-1來學習的

1 Answer

Rating
  • 1 decade ago
    Favorite Answer

    SQL> desc BONUS

    Name Null? Type

    ----------------------------------------------------------------------------- -------- ------------

    ENAME VARCHAR2(10)

    JOB VARCHAR2(9)

    SAL NUMBER

    COMM NUMBER

    SQL> alter table BONUS rename column comm to com;

    Table altered.

    SQL> desc BONUS

    Name Null? Type

    ----------------------------------------------------------------------------- -------- ------------

    ENAME VARCHAR2(10)

    JOB VARCHAR2(9)

    SAL NUMBER

    COM NUMBER

    • Login to reply the answers
Still have questions? Get your answers by asking now.