mysql 如何查询出某字段的值不为空的数据

问题:查询原有某类数据的数量,对比发现,新旧数据的差距是新插入的数据某些字段为空,那么,mysql 如何查询出某字段的值不为空的数据

SELECT * FROM `usr_merchants` a where address is not null and address <>'';


不要想当然的写成 !=null 或 <> null

猜你喜欢

转载自mingyundezuoan.iteye.com/blog/2223204