2 wendy 520 wendy_520 于 2014.06.05 23:04 提问

oracle sql语句建表约束问题

create table workers
(
wID char(5)
check ( wID like‘[a-z][0-9][0-9][0-9][0-9]’),
wName char(10) NOT NULL,
wSex char() check ( wSex IN (‘女’,‘男’)),
wTel char(11)
check ( wTel like‘[0-9][0-9][0-9][0-9][0-9][0-9]

[0-9][0-9][0-9][0-9][0-9]’),
wAge SMALLINT CHECK ( wAge>=18 AND wAge<=55),
wCode char(10) NOT NULL,
Primary key (wID)
);

这样一个简单的代码,无法成功建表
Oracle11g

1个回答

swings2010
swings2010   2014.06.15 12:21

wSex char(2) check ( wSex IN ('女','男')),

Csdn user default icon
上传中...
上传图片
插入图片