Existing constraint
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: Existing constraint

  1. #1
    Join Date
    Sep 2000
    Location
    VA
    Posts
    343
    Hi all,

    Is there any way I could change an existing constraint and add 'Delete cascade' option without dropping & recreating it ?

    Shiva.

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    DELETE CASCADE is part of CREATE TABLE Statement.
    So, you cannot add it later.

  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    On existing constraint you can only change its state (DEFERRABLE, IMMEDIATE/DEFERRED) with "ALTER TABLE ... MODIFY CONSTRAINT ..." without droping and re-creating the constrain. For every other change, including DELETE CASCADE, you have to drop existing constraint and add a new one with "ALTER TABLE DROP/ADD CONSTRAINT ...".
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

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