MESQL!我想删除一个表中的一条记录,该记录在另一个表中的多个字段上有匹配项。这可能吗?
我将使用的 MySql 查询可能类似于:
delete from t1 used t1,t2 where t1.f1=t2.f1 and t1.f2=t2.f2
或
delete t1 from t1,t2 where...
根据http://docs.memsql.com/docs/delete :
MemSQL does not yet fully support multi-table DELETE statements. Subqueries in the WHERE clause are the only multi-table DELETE allowed.
我可以在删除where子句中使用多个条件而不使用concat等吗?
附注抱歉我的英语很糟糕
最佳答案
尝试这样的事情:
delete from t1 where exists (select 1 from t2 where t1.f1=t2.f1 and t1.f2=t2.f2)
关于mysql - memsql多表删除,可以吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39833016/