如何从数据库的所有表中删除所有记录?我可以使用一个SQL命令来执行此操作,还是每个表需要一个SQL命令?
从表1中删除WHERE ConditionID =?ConditionID;
DELETE FROM Table2 WHERE ConditionID=?ConditionID;
DELETE FROM Table3 WHERE ConditionID=?ConditionID;
Run Code Online (Sandbox Code Playgroud)
ConditionID是Table1,Table2,Table3中的一列,而不是单独运行3次,有没有办法在单个查询中运行全部三个(在mysql中)?