SQL>ALTER TABLE table_name RENAME COLUMN old_col TO new_col;

解决方案 »

  1.   

    SQL> alter table test1 rename column id to id1;
    alter table test1 rename column id to id1
                             *
    ERROR at line 1:
    ORA-14155: missing PARTITION or SUBPARTITION keyword
      

  2.   

    To:回复人: jsnicle(js_nicle) 你的Oracle是什么版本?SQL> create table test(id number,name varchar2(10));Table createdSQL> desc test
    Name Type         Nullable Default Comments 
    ---- ------------ -------- ------- -------- 
    ID   NUMBER       Y                         
    NAME VARCHAR2(10) Y SQL> alter table test rename column name to v_name;Table alteredSQL> desc test
    Name   Type         Nullable Default Comments 
    ------ ------------ -------- ------- -------- 
    ID     NUMBER       Y                         
    V_NAME VARCHAR2(10) Y