DELETE FROM Table1 WHERE ConditionID=?ConditionID;
DELETE FROM Table2 WHERE ConditionID=?ConditionID;
DELETE FROM Table3 WHERE ConditionID=?ConditionID;
ConditionID is a column present in Table1,Table2,Table3, instead of running 3 times individually, is there a way to run all the three in a single query (in mysql)?
If the
ConditionID
is the same for all the three tables, you should be able to use the Multiple Table Delete Syntax:Test case:
Result: