create table test (
id varchar2(20) not null,
flag char(1) default '0' not null
);
我想对test进行这样的约束:对于所有flag为'0'或'1'的记录,id不能有重复,对于flag为'2'的记录则不做限制
请教各位高手,此约束能否实现