Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Temporary On Delete Cascade

Status
Not open for further replies.

dalhousi

Programmer
Mar 26, 2007
21
CA
Hi all,

I'm facing a little problem in deleting records from MySQL. My database contains around a 100 tables and there are so many relationship among them (just like spaghetti).

I want to delete couple of records with all their children but the problem is that the constraints do not have an "On delete cascade".

I do not want to add the delete cascade to the constraints but I was wondering if there is a temporary cascade deletion in MySQL so when I delete a record it will automatically delete all its children at once.

Thanks in advance,
 
you can either add the ON DELETE CASCADE, do your deletes, then remove it

or do your deletes manually

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top