文章详情页
mysql - msyql 判断字段不为空 简单方法
问题描述
一般判断是否空where name is not null and name != ’’;
有没有简单方法 一步到位
length(name)>0 是个方法;有没有empty等?
问题解答
回答1:name != null;是错误的,因为null都不等于null
mysql> select null=null;null=nullNULL1 row in set (0.03 sec)
mysql> select null is null;null is null11 row in set (0.00 sec)
判断不为空,如果字段default null where name is not null 否则 where name != ’’
相关文章:
1. javascript - prismplayer播放器全屏问题2. python相关问题求解决,有偿3. python3.x - mongodb 显示不出中文,都是方块,该如何解决?4. javascript - vue2.0中router.repalce跟router.push有什么区别,二者的应用场景是会有怎样的区别?5. javascript - 在sublime中如何给.vue文件注释?6. HTML5怎么访问本地文件?7. javascript - 这种上传图片预览怎么做?8. javascript - input输入框触发change事件后,外部元素会被选中9. javascript - 把字符串日期转换成一般时间格式后,发现小于10的数字不会自动添加0在前面,如下10. javascript - js判断一个数组是否重复
排行榜