select * from user where address != "北京"
select * from user where address <> "北京"
select * from user where address = null
select * from user where address is null
select * from user where address != null
总结:
select * from user where address != "北京" select * from user where address <> "北京" select * from user where address = null select * from user where address is null select * from user where address != null select * from user where address is not null
短短几条语句,三个极其常见的点,或许我们在回答的时候却不知所措,犹豫不决。
在<>和!=是等价的。在某字段不等于某值(非空的值)时,输出的结果此字段为空不输出。
is 和 is not 用于和 null 结合,我称它为不是,不是空
到此这篇关于MySQL 不等于的三种使用及区别的文章就介绍到这了,更多相关MySQL 不等于内容请搜索
更多Mysql内容来自木庄网络博客
标签:Mysql
相关阅读 >>
更多相关阅读请进入《mysql》频道 >>

数据库系统概念 第6版
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。