P’unk Avenue

You are viewing 1 post for 27 May 2009

Filter By

Date

How to add ON DELETE CASCADE to an existing MySQL table without dropping any existing data

You created a MySQL table with a foreign key reference... for instance, a user_id field that refers to a separate table of users. Then you realized you should have specified "ON DELETE CASCADE" when creating the table. Now, when you…