我查了下帖子,好像都说在 9i中能用
alter table WL_CJSXB rename column KY1 to XQBZOID 
来重命名列
为什么我的不行了?

解决方案 »

  1.   

    alter table table_name rename 语句只能对表进行重命名,不能对表中的列进行重命名,如果想队列进行重命名,必须先删除该列在进行重建。
      

  2.   

    不好意思我上面说的是oracle的官方教材上说得,但是我新查了一下网上的资料如下:
    try this:alter table <table_name> rename column <old> to <new>;
     
    Comment from jpkemp 
    Date: 05/25/2004 05:18AM PDT
     Comment  
    Note: The "rename column" syntax will work in Oracle 9i, not 8i.
     
    Comment from andoni2 
    Date: 06/09/2004 07:15AM PDT
     Comment  
    And then only in 9.2 not in 9.0.1. 也就是不是所有的9i都可以使用这个语句的,要9.2以上才可以