Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    26

    Red face Unanswered: Disabling Foreign Key

    Is it possible to disable a foreign key in DB2 v8 Universal Database.

  2. #2
    Join Date
    Nov 2004
    Posts
    1,427
    Provided Answers: 4
    Code:
    ALTER TABLE mytable
    DROP FOREIGN KEY myforeignkeyname
    ;
    If you don't know the name of the FK, check out the system table or do it the quick and dirty way: try to update the referencing column into a value that does not occur in the parent table.

    Wim

Posting Permissions

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