If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I post this question earlier but no one seems to answser, so I post again.

DEFERRABLE | NOT DEFERRABLE options mean that constraints can be set to DEFERRED | NOT DEFERRED by SET CONSTRAINT(S) ?
So, initial constraint state is set by INITIALLY DEFERRED | INITIALLY IMMEDIATE , and if a constraint is set DEFFERABLE INITIALLY IMMEDIATE, it means that constraint is set INITIALLY IMMEDIATE, but can be changed to DEFFERABLE by SETTING CONSTRAINT(S) command ?

Need your help on this.

Thank you so much.

Woo

Do not worry people not knowing you,
but seek the way that truely make yourself known to them-Confucius
Need an Oracle running on Mac OS !!aleaves@hitel.net

This will then give you a chance to delete the "child" rows before issuing the
"commit" command. For example:

SQL> delete dept where deptno=20;

1 row deleted.

SQL> delete emp where deptno=20;

5 rows deleted.

SQL> commit;

Commit complete.

Another situation where the deferred constraint checking feature could be useful
is if you want to change the primary key value in the parent table i.e., "DEPT".

SQL> update dept set deptno=25 where deptno=20;

1 row updated.

SQL> update emp set deptno=25 where deptno=20;

5 rows updated.

SQL> commit;

Commit complete.

A constraint can also be created "INITIALLY IMMEDIATE DEFERRABLE". This means
that the constraint will be checked at "initially" instead of at "commit" time,
unless you manually set the constraint to "deferrable". For example: