[DB] NULL, CASE, ESCAPE
1. NULL DBMS에서 null는 "값을 알 수 없음"을 의미한다. 가. IS NULL null는 "값을 알 수 없음"을 의미한다. select * from ta where can_be_null = null; 그래서 다음과 같은 방식으로 null인 row를 찾을 수 없다. select * from ta where can_be_null is null; null 값을 찾고 싶다면 = null이 아닌 is null 을 사용할 것. select * from ta where can_be_null is not null; is not null도 가능한다. 나. IFNULL() select IFNULL(can_be_null, 0) from ta; IFNULL(can_be_null, 0) : can_be_null가 ..
2024.04.14