postgresql  null 值 不受查询条件约束

Posted ljtyxl

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了postgresql  null 值 不受查询条件约束相关的知识,希望对你有一定的参考价值。

postgresql  null 值 不受查询条件约束

postgresql null 值 不受查询条件约束

 

select count(1) cnt from dm.algo_m_gg_1_prt_qycg_ebs_shasteel_cn where (minfo4 is null or length(minfo4)<5 ) and (page_type!=2 ) and length(page)>100;

 

select count(1) cnt from dm.algo_m_gg_1_prt_qycg_ebs_shasteel_cn where (minfo4 is null or length(minfo4)<5 ) and (page_type!=2 or page_type is null) and length(page)>100;

 

 

 

 

 

page_type 有的内容为null,条件page_type!=2,对这种值没有约束

 

以上是关于postgresql  null 值 不受查询条件约束的主要内容,如果未能解决你的问题,请参考以下文章