weibo_盈盈水间晴_0
2018-02-07 10:44
SQL> create table userinfo_n
2 (id varchar2(10) not null,
3 username varchar2(20));
Table created.
SQL> select constraint_name,constraint_type,status from user_constraints
2 where table_name='USERINFO_N';
CONSTRAINT_NAME
--------------------------------------------------------------------------------
C STATUS
- --------
SYS_C00729107
C ENABLED
SQL> alter table userinfo_n
2 rename constraint SYS_C00729107 to not_null_constraint;
Table altered.
SQL> select constraint_name,constraint_type,status from user_constraints
2 where table_name='USERINFO_N';
CONSTRAINT_NAME
--------------------------------------------------------------------------------
C STATUS
- --------
NOT_NULL_CONSTRAINT
C ENABLED
试了一下,是有名称的,也能用删掉约束名称的方式来删掉此约束,你好细致
Oracle数据库开发必备利器之SQL基础
160642 学习 · 641 问题
相似问题