码迷,mamicode.com
首页 > 数据库 > 详细

Oracle建表

时间:2015-10-26 22:22:28      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:

create table T_HQ_E
(
xingm VARCHAR2(10),
chengj NUMBER not null,
jiatzz VARCHAR2(15)
)
tablespace SYSTEM
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 16K
minextents 1
maxextents unlimited
);
-- Add comments to the columns
comment on column T_HQ_E.xingm
is ‘姓名‘;
comment on column T_HQ_E.chengj
is ‘成绩‘;
comment on column T_HQ_E.jiatzz
is ‘家庭住址‘;
-- Create/Recreate primary, unique and foreign key constraints
alter table T_HQ_E
add constraint PK_T_HQ_JIATDZ primary key (CHENGJ)
using index
tablespace SYSTEM
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
-- Create/Recreate check constraints
alter table T_HQ_E
add constraint CHECK_CHENGJ
check (chengj>60 and chengj <100);

Oracle建表

标签:

原文地址:http://www.cnblogs.com/ymf123/p/4912485.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!