SELECT LV FROM (SELECT LEVEL LV FROM DUAL CONNECT BY LEVEL<=20) WHERE T.LV NOT IN(SELECT CERSEQ FROM A);
SELECT LV FROM (SELECT LEVEL LV FROM DUAL CONNECT BY LEVEL<=20) T WHERE T.LV NOT IN(SELECT CERSEQ FROM A);
with a as( select 1 cerseq from dual union all select 2 from dual union all select 3 from dual union all select 10 from dual union all select 11 from dual union all select 12 from dual union all select 13 from dual union all select 14 from dual union all select 15 from dual union all select 20 from dual ),b as( select level lv from dual connect by level <= 20 ) select lv from b where lv not in (select cerseq from a)
SELECT LV
FROM (SELECT LEVEL LV FROM DUAL CONNECT BY LEVEL<=20)
WHERE T.LV NOT IN(SELECT CERSEQ FROM A);
SELECT LV
FROM (SELECT LEVEL LV FROM DUAL CONNECT BY LEVEL<=20) T
WHERE T.LV NOT IN(SELECT CERSEQ FROM A);
select 1 cerseq from dual
union all
select 2 from dual
union all
select 3 from dual
union all
select 10 from dual
union all
select 11 from dual
union all
select 12 from dual
union all
select 13 from dual
union all
select 14 from dual
union all
select 15 from dual
union all
select 20 from dual
),b as(
select level lv from dual connect by level <= 20
)
select lv from b where lv not in (select cerseq from a)