I read this about the SQL keyword DEFERRABLE
in Database Systems - The Complete Book.
The latter [NOT DEFERRABLE] is defau
I'm very late to the party but I wanted to add that -- as of December 2018 -- only two databases I know of (there may be more) offer some level of implementation of this standard SQL feature:
Database NOT DEFERRABLE DEFERRABLE DEFERRABLE
INITIALLY IMMEDIATE INITIALLY DEFERRED
---------- -------------- ------------------- ------------------
Oracle N/A *1 Yes (default) Yes
PostgreSQL Yes (default) Yes Yes
DB2 - - -
SQL Server - - -
MySQL - - -
MariaDB - - -
SAP Sybase - - -
HyperSQL - - -
H2 - - -
Derby - - -
*1 Even though Oracle 12c accepts the NOT DEFERRABLE
constraint state, it actually ignores it and makes it work as DEFERRABLE INITIALLY IMMEDIATE
.
As you see, Oracle does not implement the first type (NOT DEFERRABLE
), and that's why developers using Oracle (the OP in this case) may get confused and consider the first two types equivalent.
Interestingly enough Oracle and PostgreSQL have a different default type. Maybe it has performance implications.