ORA-02299错误

在已经使用的数据库表上,为字段添加unique属性,会报错:ORA-02299.

SQL> create index uaccount_inx on userss(uaccount);

Index created

SQL> alter table userss add constraint uaccount_unique(uaccount) enable novalidate;

alter table userss add constraint uaccount_unique(uaccount) enable novalidate

ORA-00904: : 标识符无效

SQL> alter table userss add constraint uaccount_unique unique(uaccount) enable novalidate;

Table altered

SQL> commit;

Commit complete

使用上面的命令就可以解决问题。

不积跬步,无以至千里,不积小流,无以成江河
原文地址:https://www.cnblogs.com/sunteng-change-control/p/4422975.html