SQL 字符串与数字等于比较与null的判断逻辑

[亡魂溺海] 提交于 2019-11-27 13:28:20

 

sku_cid3是int类型,sku_cid3!=null 永远都是null

SELECT   cast(sku_brand_id as int) AS brand_code,   cast(sku_cid3 as int) AS third_cate_code,   count(1) AS ad_pv FROM ad.ad_base2_impression WHERE dt='2019-08-15' AND sku_brand_id != '0'   AND sku_cid3 IS NOT NULL AND sku_cid3 <> '' GROUP BY sku_brand_id, sku_cid3

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!