问题描述
- 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
解决方案
wSex char(2) check ( wSex IN ('女','男')),
时间: 2024-10-02 17:52:40