delete多条件下如何写?
两张表,结构相同,有两个字段,且字段1 + 字段2是主键,表1的数据是表2的子集,假设表1中有些数据表2中没有,如何删除这些数据? delete * from tb1 where tb1.col1||tb1.col2 not in (select col1 from tb2) delete from tab1where not exists (select 1 from tab2 where tab1.col1=tab2.col1 and tab1.col2=tab2.col2)
页:
[1]