WITH TABLE_A AS( SELECT '1'a FROM dual union all SELECT '2' FROM dual union all SELECT '3' FROM dual UNION all SELECT '4' FROM dual UNION all SELECT '' FROM dual UNION all SELECT 'r4' FROM dual UNION all SELECT '4a' FROM dual ) select decode(a,null,1,1)a from table_a; --이해가 부족하여....죄송합니다; --각테이블 마다 이런식으로 변경하면 되지 않을까 싶은데요;;