What are different actions on ON DELETE clause of foreign key constraint ?

Different actions on ON DELETE clause of foreign key constraint :
  1. NO ACTION specifies that the deletion fails with an error.
  2. CASCADE specifies that all the rows with foreign keys pointing to the deleted row are also deleted.
  3. SET NULL specifies that all rows with foreign keys pointing to the deleted row are set to NULL.
  4. SET DEFAULT specifies that all rows with foreign keys pointing to the deleted row are set to their default value.

No comments:

Popular Posts