584. 寻找用户推荐人

is NULL

https://leetcode.cn/problems/find-customer-referee/description/

水题,太水了写起来反而有种负罪感。真要说有知识点的话就是NULL值不能用等号去判断,因为它不是个数。和GO或者python里面的nil,none不一样。

SQL
# Write your MySQL query statement below
SELECT name
FROM Customer 
WHERE referee_id !=2 OR referee_id is NULL
Subscribe
提醒
0 评论
Inline Feedbacks
View all comments
0
在此留下你的评论x