1 查数据查询一个表中在另一个表中不存在的数据
select * from t1 where t1.v_no not in (
select v_no from t2 where v_no is not null
)
--where v_no is not null 一定要加上班否则无法查处结果
select * from t1 where not exists(
select 1from t2 where t1.v_no= t2.v_no)
select * from t1 where t1.v_no not in (
select v_no from t2 where v_no is not null
)
--where v_no is not null 一定要加上班否则无法查处结果
select * from t1 where not exists(
select 1from t2 where t1.v_no= t2.v_no)