功能介绍
为了方便用户从Oracle数据库迁移到LightDB数据库,LightDB从23.3版本开始支持 create table时列约束支持enable/disable关键字。这个功能仅是语法糖。
使用说明
执行create table时,列约束后面可以选择性添加enable/disable关键字。
create table t1(name varchar(10) not null, id int check(id >10));
create table t2(name varchar(10) not null enable, id int check(id >10) enable);
create table t3(name varchar(10) not null disable, id int check(id >10) disable);
create table t4(name varchar(10) not null enable, id int check(id >10) disable);
create table t5(name varchar(10) not null, id int check(id >10) disable);
create table t6(name varchar(10) not null disable, id int check(id >10));
create table t7(name varchar(10) not null disable primary key enable, id int check(id >10) enable unique disable);