SELECT
ID
, NAME
, EMAIL
, BIRTH
FROM
MEMBER
ORDER BY
BIRTH IS NULL ASC
, BIRTH
ORDER BY 절에서 CASE문을 통해 NULL, 공백 등에 값을 지정해 정렬해준다.
SELECT
ID
, NAME
, EMAIL
, BIRTH
FROM
MEMBER
ORDER BY
CASE WHEN BIRTH is NULL THEN '2'
WHEN BIRTH = '' THEN '1'
ELSE '0' END
, BIRTH