当前位置:Gxlcms > 数据库问题 > SQL Server MySQL 中的 in 与 null

SQL Server MySQL 中的 in 与 null

时间:2021-07-01 10:21:17 帮助过:3人阅读

  技术分享

查询二:

  select * from t where x=1 or x=2 or x=null -- 说明 in 只是多个 or = 的语法糖衣吧。

  技术分享

查询三:如果要真正的返回null行,可以这样做

  select * from t where x in (1,2) or x is null

  技术分享

 

SQL Server MySQL 中的 in 与 null

标签:

人气教程排行