首先先了解is null 与 is not null 分别代表什么;is null 在查询中用于查询指定字段为null的数据、is not null 在查询中用于查询指定字段中不为null的数据(手动删除的无法查询); 语法为 selec
首先先了解is null 与 is not null 分别代表什么;is null 在查询中用于查询指定字段为null的数据、is not null 在查询中用于查询指定字段中不为null的数据(手动删除的无法查询);
语法为 select * from 数据表名称 where 字段名 is null / is not null
先看看原本数据表
现在id为20的字段名为name的值为null
使用select * from cher where name is null 查询
或使用select * from cher where name is not null查询其他字段名为name且不为空的值
来源地址:https://blog.csdn.net/zzx262625/article/details/129295457
--结束END--
本文标题: MySQL where条件is null 及is not null 的用法
本文链接: https://www.lsjlt.com/news/417180.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-16
2024-05-16
2024-05-16
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
2024-05-15
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0