delete from table1 where table1.col1=1
and exists(select table2.id from table2 where table2.col2=table1.col2 and table2.col2=2)
跨表删除条件验证
delete from table1 where table1.col1=1
and exists(select table2.id from table2 where table2.col2=table1.col2 and table2.col2=2)