WITH T AS(
SELECT NULL AS DT FROM DUAL UNION ALL
SELECT NULL AS DT FROM DUAL UNION ALL
SELECT '' AS DT FROM DUAL UNION ALL
SELECT '' AS DT FROM DUAL UNION ALL
SELECT '-' AS DT FROM DUAL UNION ALL
SELECT '-' AS DT FROM DUAL UNION ALL
SELECT 'A' AS DT FROM DUAL UNION ALL
SELECT 'B' AS DT FROM DUAL UNION ALL
SELECT 'C' AS DT FROM DUAL UNION ALL
SELECT 'D' AS DT FROM DUAL UNION ALL
SELECT 'E' AS DT FROM DUAL )
SELECT DT FROM T
WHERE NVL(DT,'-') = '-';
WITH T AS(
SELECT NULL AS DT FROM DUAL UNION ALL
SELECT NULL AS DT FROM DUAL UNION ALL
SELECT '' AS DT FROM DUAL UNION ALL
SELECT '' AS DT FROM DUAL UNION ALL
SELECT '-' AS DT FROM DUAL UNION ALL
SELECT '-' AS DT FROM DUAL UNION ALL
SELECT 'A' AS DT FROM DUAL UNION ALL
SELECT 'B' AS DT FROM DUAL UNION ALL
SELECT 'C' AS DT FROM DUAL UNION ALL
SELECT 'D' AS DT FROM DUAL UNION ALL
SELECT 'E' AS DT FROM DUAL )
SELECT DT FROM T
WHERE DT IN ( DT ,'')
위 두 쿼리의 결과과 다른데....왜 그런건지 이유좀 알수 있을까요?;;; ㅠㅠ