On DELETE cascade and on UPDATE cascade

Source: Internet
Author: User

This is an optional database foreign key definition that sets the transformation rules for the response field in the Foreign key table when the data of the referenced column in the primary key table changes. Update is the value of the referenced field in the primary key table, and delete refers to the deletion of a record in the primary key table:
On update and on Delete can be followed by four words
No action, set NULL, set default, Cascade
No action means no action,
Set NULL indicates that the corresponding field in the foreign-key table has a null
Set default means setting to defaults
Cascade represents cascading operations, that is, if the primary key table is updated in the Reference field, the Foreign key table is also updated, the records in the primary key table are deleted, and the row in the Foreign key table is deleted accordingly

On DELETE cascade and on UPDATE cascade

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.