Oracle里对约束的增删改 |
发布时间: 2012/8/20 17:33:42 |
添加约束 SQL>alter table customer add constraint cardunique unique(cardId); 删除约束 SQL>alter table customer drop constraint addresscheck; 在删除主键的时候,必须带上cascade选项 - 添加主键 SQL>alter table customer add constraint pkkey primary key(customerId); 查看约束信息 SQL> select constraint_name,table_name,r_owner,r_constraint_name 2 from all_constraints where table_name='goods' and table_name='customer' 本文出自:亿恩科技【www.enkj.com】 |