表1——名:A,字段:id,name, age
表2——名:B,字段:id, name
方法一:
delete A
from A inner join B
on A.id = B.id
where B.name = 'xxx';
方法二:
delete from A
where id in (select id from B where name = 'xxx');
表1——名:A,字段:id,name, age
表2——名:B,字段:id, name
方法一:
delete A
from A inner join B
on A.id = B.id
where B.name = 'xxx';
方法二:
delete from A
where id in (select id from B where name = 'xxx');