MySQL Foreign Key Referential Actions

Referential Actions When an UPDATE or DELETE operation affects a key value in the parent table that has matching rows in the child table, the result depends on the referential action specified by ON UPDATE and ON DELETE subclauses of the FOREIGN KEY clause. Referential actions include: CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the…

Some of The Most Important SQL Commands

SELECT – extracts data from a database UPDATE – updates data in a database DELETE – deletes data from a database INSERT INTO – inserts new data into a database CREATE DATABASE – creates a new database ALTER DATABASE – modifies a database CREATE TABLE – creates a new table ALTER TABLE – modifies a table DROP TABLE – deletes a table CREATE INDEX –…