扫码关注官方订阅号
一般判断是否空where name is not null and name != '';
有没有简单方法 一步到位
length(name)>0 是个方法;有没有empty等?
name != null;是错误的,因为null都不等于null
name != null;
1 row in set (0.03 sec)
1 row in set (0.00 sec)
判断不为空,如果字段default null where name is not null 否则 where name != ''
where name is not null
where name != ''
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
name != null;是错误的,因为null都不等于null1 row in set (0.03 sec)
1 row in set (0.00 sec)
判断不为空,如果字段default null
where name is not null否则where name != ''