Login Register






MySQL question (ON DELETE CASCADE) filter_list
Author
Message
RE: MySQL question (ON DELETE CASCADE) #5
(08-10-2018, 12:03 AM)Hoss Wrote: I'd also like to add that "ON DELETE CASCADE" is very rarely the best option. It causes way more issues than it solves

I try and avoid using It.

When using the SQL PRIMARY KEY & FOREIGN KEY constraints (example) between two tables, I'd rather use the ON UPDATE CASCADE clause when adding the FOREIGN KEY to the child table, and then delete column rows with the SQL DELETE statement & SQL WHERE clause. To delete multiple column rows In one hit, I specify them using the SQL IN Operator.
[Image: AD83g1A.png]

Reply





Messages In This Thread
MySQL question (ON DELETE CASCADE) - by Vultra - 08-09-2018, 05:15 PM
RE: MySQL question (ON DELETE CASCADE) - by Hoss - 08-10-2018, 12:03 AM
RE: MySQL question (ON DELETE CASCADE) - by mothered - 08-10-2018, 11:50 AM