자료구조 알고리즘/코딩테스트
[MySQL] null-safe equal <=>, =
내공얌냠
2022. 5. 27. 16:13
https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_equal-to
MySQL :: MySQL 8.0 Reference Manual :: 12.4.2 Comparison Functions and Operators
12.4.2 Comparison Functions and Operators Table 12.4 Comparison Operators Name Description > Greater than operator >= Greater than or equal operator < Less than operator <>, != Not equal operator <= Less than or equal operator <=> NULL-safe equal to ope
dev.mysql.com
<=> 은 =과 비슷하게 비교를 하지만
<=> 은 둘 다 NULL 이면 1을 반환하고, 하나의 피연산자가 NULL 이면 0을 반환합니다.
= 은 둘 다 NULL 이면 NULL을 반환하고, 하나의 피연산자가 NULL일 때에도 NULL을 반환합니다.
728x90
반응형