delete from table1 where user_id = ...
delete from table2 where user_id = ...
delete from table3 where user_id = ...
delete from table4 where user_id = ...
I try to make from this 1 query, but not result.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think that will work
There’s another solution that might work:
Anyway, you can define foreign key constraints on the tables with
ON DELETE CASCADEoption, then deleting a record from parent table removes all records from child tables.