Answer the question
In order to leave comments, you need to log in
How to delete from three or more mysql tables by one id?
For removal I use request from the documentation.
DELETE FROM userdata, moneys, user_roles USING userdata INNER JOIN moneys INNER JOIN user_roles WHERE userdata.userid=525300849082105856 AND moneys.userid=525300849082105856 AND user_roles.userid=525300849082105856;
Answer the question
In order to leave comments, you need to log in
DELETE
FROM userdata, moneys, user_roles
USING ( SELECT 525300849082105856 userid ) criteria
LEFT JOIN userdata USING (userid)
LEFT JOIN moneys USING (userid)
LEFT JOIN user_roles USING (userid);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question