为什么下面的查询返回一个空集?
SELECT *
FROM null_test_tab
WHERE col1 = NULL
ORDER BY id
结果:
Empty set
最佳答案
表达式应该是col is null
。与null
进行算术比较,如col = null
,结果为null。
看看:https://dev.mysql.com/doc/refman/8.0/en/working-with-null.html
关于MySQL 查询返回 "Empty Set",为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54546295/