时间:2024-03-04 00:33作者:下载吧人气:17
drop table if exists test;
create table test(
objectid serial not null,
num integer not null,
constraint pk_test_objectid primary key (objectid),
constraint ck_test_num check(num < 123 ),
);
comment on table test is ‘我是表’;
comment on column test.objectid is ‘我是唯一主键’;
comment on column test.num is ‘数量字段’;
comment on constraint pk_test_objectid on test is ‘我是约束,唯一主键’;
comment on constraint ck_test_num on test is ‘我是约束,num字段必须小于123’;
dS+ test;
网友评论