Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
enrolment_id是student表中的外键,我想获取尚未设置外键的学生。含义(但这在子句enrolment_id = NULL中不起作用)。WHERE
enrolment_id
student
enrolment_id = NULL
WHERE
该怎么办?
比较NULL值时,请改用IS NULL谓词:
NULL
IS NULL
... WHERE enrolment_ID IS NULL;
= NULL不会工作。
= NULL
SELECT * FROM student AS s WHERE s.enrolment_ID IS NULL;