我使用以下语句创建了一个表。
create table constraint_test(name varchar(20), city varchar(20) not null check (city in ('chennai','vellore')), phone numeric(10));
但是当我插入时,
insert into constraint_test values('abcd,'ooty',123456);
它被存储。我该如何限制它?
我使用以下语句创建了一个表。
create table constraint_test(name varchar(20), city varchar(20) not null check (city in ('chennai','vellore')), phone numeric(10));
但是当我插入时,
insert into constraint_test values('abcd,'ooty',123456);
它被存储。我该如何限制它?