Oracle 检查约束check
时间:2021-07-01 10:21:17
帮助过:3人阅读
检查约束
create table test1(
id number(
10)
primary key,
email varchar2(
10)
check (email
like ‘%@%‘)
)
drop table test1
insert into test1
values(
1,
‘12@6.com‘);
select * from test1
create table test2(
id number primary key,
gender varchar2(
4)
check(gender
in(
‘男‘,
‘女‘))
)
drop table test2
select * from test2
insert into test2
values(
1,
‘男‘)
Oracle 检查约束check
标签:oracl color value oracle from char .com drop arch