【oralce】约束之检查约束
作者:互联网
1、创建表时添加检查约束
CREATE TABLE table_name (
column1 datatype CHECK (expressions),
...);
CREATE TABLE table_name(
column1 datatype,
column2 datatype,
CONSTARINT constraint_name CHECK (expressions),...);
2、修改表时添加检查约束
ALTER TABLE table_name(
ADD CONSTRAINT constraint_name CHECK (expression));
3、删除检查约束
ALTER TABLE table_name (
DISABLE |ENABLE CONSTRAINT constraint_name);
ALTER TABLE table_name (
DROP CONSTRAINT constraint_name);
标签:oralce,name,检查,constraint,约束,TABLE,table,ALTER,CHECK 来源: https://www.cnblogs.com/xlzhangq/p/13246728.html