1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | WITH V_TEST AS ( SELECT 'A' COL FROM DUAL UNION ALL SELECT 'B' COL FROM DUAL UNION ALL SELECT 'C' COL FROM DUAL UNION ALL SELECT 'D' COL FROM DUAL UNION ALL SELECT 'E' COL FROM DUAL UNION ALL SELECT 'F' COL FROM DUAL UNION ALL SELECT 'G' COL FROM DUAL UNION ALL SELECT NULL COL FROM DUAL ) SELECT COL FROM V_TEST WHERE EXISTS ( SELECT 1 FROM V_TEST WHERE COL IS NOT NULL ); |