为什么以下查询返回空集?
SELECT *
FROM null_test_tab
WHERE col1 = NULL
ORDER BY id
Run Code Online (Sandbox Code Playgroud)
结果:
Empty set
Run Code Online (Sandbox Code Playgroud)
表达应该是col is null.算术比较的结果null,例如col = null,为null.
请查看:https://dev.mysql.com/doc/refman/8.0/en/working-with-null.html