在 Oracle 中,延迟约束仅在提交时进行检查。
在 NOT NULL 约束的情况下,DEFERRABLE 子句的含义是什么?例如
create table test(a number not null deferrable, b number);
insert into test(a,b) values (222, 111);
commit;
在这些陈述之后,我认为下面的代码会起作用
update test set a = null where b = 111;
delete test where b = 111;
commit;
但事实并非如此。
两种定义有什么区别?
create table test1(a number not null deferrable, b number);
create table test2(a number not null, b number);