-- Create table create table T_HQ_XS ( xueh VARCHAR2(10) not null, xingm VARCHAR2(20) not null, xingb CHAR(1) default '1', nianl NUMBER, zhuany VARCHAR2(20) ) -- Add comments to the columns comment on column T_HQ_XS.xueh is '学号'; comment on column T_HQ_XS.xingm is '姓名'; comment on column T_HQ_XS.xingb is '性别 1-男,2-女'; comment on column T_HQ_XS.nianl is '年龄'; comment on column T_HQ_XS.zhuany is '专业'; -- Create/Recreate primary, unique and foreign key constraints alter table T_HQ_XS add constraint PK_T_HQ_XS primary key (XUEH) -- Create/Recreate check constraints alter table T_HQ_XS add constraint CHECK_T_HQ_XS_NIANL check (NIANL > 8 AND NIANL < 50); alter table T_HQ_XS add constraint CHECK_T_HQ_XS_XINGB check (XINGB = '1' OR XINGB = '2');
Oracle建表
免责声明:文章转载自《Oracle建表》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇Caused by: java.net.UnknownHostException: struts.apache.orgSnack3 一个新的微型JSON框架下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=