第一种判断字段为空
where XX is
null
,XX字段什么也没存,这是数据库的判断语法,//我在plsqlplus中,用的是这句
select DISTINCT b.ssfk from cxc.base b,sys_gani c where b.gldw=c.org_id and ssfk is null
第二种判断字段不为空
where XX is not
null
select DISTINCT b.ssfk from cxc.base b,sys_gani c where b.gldw=c.org_id and ssfk is not null