发布网友 发布时间:2022-04-22 19:40
共4个回答
热心网友 时间:2022-04-08 11:50
有id好说 delete from 2_2 WHERE id in (select id from 1_1)
没有就比较麻烦
delete from 2_2 where exists (select 1 from 1_1 where 1_1.所有项目=2_2.所有项目)追问delete from 2_2 select * from 1_1 这样写 可不可呢
追答不能这么写,语法不对
热心网友 时间:2022-04-08 13:08
delete from (select * from 1_1 wher 1=1) a;
commit;
就可以了
热心网友 时间:2022-04-08 14:43
delete from 2_2 where exists (select 1 from 1_1 where 2_2.字段=1_1.字段)
热心网友 时间:2022-04-08 16:34
delete from 1_1