INITIALLY DEFERRED DEFERRABLE ?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: INITIALLY DEFERRED DEFERRABLE ?

Hybrid View

  1. #1
    Join Date
    Dec 2000
    Posts
    95

    Question

    Hi ,

    normally we create th foreign keys like follows

    SQL> create table indextest (id number,name varchar2(10));

    Table created.

    SQL> alter table indextest add constraint id_pk primary key (id);

    Table altered.

    SQL> create table indextest1 (id number,birthdate date);

    Table created.

    SQL> alter table indextest1 add constraint id_fk foreign key (id) references indextest(id);

    Table altered.


    but in some application i have observed the following query

    SQL> ALTER TABLE indextest1 ADD CONSTRAINT id_fk FOREIGN KEY (id) REFERENCES indextest INITIALLY DEFERRED DEFERRABLE;


    what is INITIALLY DEFFERED DEFERRABLE? And what it will do?


    Thanks for any help


    SrinivasM



  2. #2
    Join Date
    Apr 2001
    Posts
    51

    DEFERRED
    indicates that the conditions specified by the deferrable constraint are checked when the transaction is committed.

    INITIALLY DEFERRED DEFERRABLE tells Oracle to do deferred constraint checking

    Hope this helps u.

  3. #3
    Join Date
    Nov 2000
    Posts
    79
    In addtion to what miritika wrote, this type of constraint checking is more useful when two tables are joined with foreign key relationship (parent-child) and data is entered in both at same time.

    Default value of DEFERRABLE constraint is INITIALLY IMMEDIATE.

    gtm


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width