delete from 主表 where id in(select id from 子表)或者delete from 主表 where 子表的查询条件
delete 主表 from 主表 a where exists(select 1 from 子表 where 子表字段=a.字段)
有没有ID, delete from tb where id in (select id from tb1)
delete from maintable where exists (select 1 from subtable where maintable.id=subtable.id)delete from maintable where exists (select 1 from subtable where 1=1 and maintable.field1=subtable.field1 and maintable.field2=subtable.field2 and maintable.field3=subtable.field3 and maintable.field4=subtable.field4)
delete [主表] from [主表] a where exists(select 1 from [子表] where [子表].关连字段=a.关连字段)
delete 主表 from 主表 a where exists(select 1 from 子表 where 子表字段=a.字段)
delete from tb where id in (select id from tb1)
where exists (select 1 from subtable
where maintable.id=subtable.id)delete from maintable
where exists (select 1 from subtable where 1=1
and maintable.field1=subtable.field1
and maintable.field2=subtable.field2
and maintable.field3=subtable.field3
and maintable.field4=subtable.field4)