例如: 查询表中name属性等于null 的数据

select * from table_name where name=null 这中写法是错误的

select * from table_name where name is null 这是正确的写法

在MySql或Oracle中 通过关键字 is null 或is NULL 来判断字段的name的值是否为空。

如果字段name 的值为NULL,则满足条件,该记录就会被查询出来;

否则就不会被查询出来。

 

相关文章:

  • 2021-12-02
  • 2022-12-23
  • 2021-10-01
  • 2021-07-24
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2021-08-05
  • 2021-12-19
  • 2022-12-23
  • 2021-12-26
相关资源
相似解决方案