Hi
I need some help writing a delete query which deletes data from 3 different tables - tried to read up about it but could quite make sense of it.
table dives (main table)
diveid, otherfields, profileid
table profiles
profileid, otherfields
table profile_data (Index on profileid)
dataid, profileid, otherfields
Given a diveid, I want to delete the row from `dives` as well as the corresponding row in `profiles` (dives.profileid = profiles.profileid) along with all the corresponding rows in `profile_data`. (dives.profileid = profile_data.profileid)
Thanks in advance!



Reply With Quote



Bookmarks