본문 바로가기

DB/MySQL

[Syntax] See Records with NULL

In MySQL, NULL values excluded automatically while we querying data. So to see values with all NULL values, we have to add more condition to original query statement.

 

SELECT name 
  FROM customer
 WHERE referee_id <> 2 OR referee_id IS NULL;

 

 

Source from :

'DB > MySQL' 카테고리의 다른 글

[Syntax] DELETE  (0) 2022.09.15