表字段首字符是单引号,怎样可以进行alter table rename column '问题 to 问题;
注意old_column 首字符是单引号
即使加上双引号,也是不行 报ORA-00904 找不到指定标识符
评论
有用 0Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL>
SQL>
SQL> desc t;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID2 NUMBER(10)
SQL>
SQL>
SQL>
SQL> alter table t rename column id2 to "'id2";
Table altered.
SQL>
SQL>
SQL> desc t;
Name Null? Type
----------------------------------------- -------- ----------------------------
'id2 NUMBER(10)
SQL>
SQL> alter table t rename column "'id2" to id2;
Table altered.
SQL> desc t;
Name Null? Type
----------------------------------------- -------- ----------------------------
ID2 NUMBER(10)
评论
有用 0
墨值悬赏

