1.得到表3select a.* ,b.col2 from 表1 a,表2 b where a.col1=b.col12.
delete from 表1 where col1 not in(select col1 from 表2)
select * from 表1
delete from 表1 where col1 not in(select col1 from 表2)
select * from 表1
调试欢乐多
delete from 表1 where col1 in(select col1 from 表2)
select * from 表1我用这样写附和我的要求 不知道怎么了
select * from 表1
我想是理解错了你的意思,删除了未使用过的数据删除。