- 身份证号码相同(字段值出现多次)
select * from CBF_JTCY a,
(select CYZJHM, count(*) from CBF_JTCY group by CYZJHM having count(*)>1)b
where a.cyzjhm=b.cyzjhm
- 身份证号码相同但姓名不同(A字段相同,B字段不相同)
select * from cbf_jtcy a ,(select * from cbf_jtcy ) b where a.CYZJHM=b.CYZJHM and a.CYXM<>b.CYXM
- 承包方无承包合同信息(A表有,B表无)
select cbfbm,cbfmc,cbfzjhm from cbf where cbfbm not in(select cbfbm from cbht)
- 发包方无承包地块信息(A表有,B表无)
select fbfbm,fbfmc from FBF where fbfbm not in (select substr(dkbm,0,14) from cbdkxx)