Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Posts
    4

    Unanswered: Referential constraint

    What is the difference between 'on delete no action' and 'on delete restrict' in the referential constratint. Both behaves in the same way and the explanation given in the help is not clear.

    Can anybody explain with some example.

    Thanks in advance.

    Dakshinamurthi

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    After reading the SQL Reference manual, in the notes section of the CREATE TABLE statement, the difference is this. They perform the same function, specifically that when a RI is attempted to be deleted, it is blocked (and returns an error) if there is a child still pointing to it. The difference is when the constraint is enforced. "RESTRICT" is checked BEFORE all other constraints.
    "NO ACTION" is checked AFTER all other constraints.

    HTH

    Andy

  3. #3
    Join Date
    Sep 2004
    Posts
    4
    Thanks Andy

Posting Permissions

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