加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle删除唯一约束

发布时间:2020-12-12 14:36:27 所属栏目:百科 来源:网络整理
导读:一 语法 DISABLE|ENABLE CONSTRAINT constraint_name 二 代码 SQL select constraint_name , constraint_type , status from user_constraints 2 where table_name = 'USERINFO_U2' ; CONSTRAINT_NAME C STATUS ------------------------------ - -------- S
一 语法

DISABLE|ENABLE CONSTRAINT constraint_name

二 代码
  1. SQL>select constraint_name,constraint_type,status from user_constraints
  2. 2where table_name ='USERINFO_U2';
  3. CONSTRAINT_NAME C STATUS
  4. ---------------------------------------
  5. SYS_C0011117 P ENABLED
  6. UN_USERNAME_NEW U ENABLED
  7. SQL> alter table userinfo_u2
  8. 2 disable constraint UN_USERNAME_NEW;
  9. 表已更改。
  10. status from user_constraints
  11. 2where table_name ='USERINFO_U2';
  12. CONSTRAINT_NAME C STATUS
  13. ---------------------------------------
  14. SYS_C0011117 P ENABLED
  15. UN_USERNAME_NEW U DISABLED
三 语法 DROP CONSTRAINT constraint_name 四 代码
  1. SQL> alter table userinfo_u2
  2. 2 drop constraint UN_USERNAME_NEW;
  3. 表已更改。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读