SQL> with t as( 2 select 10 id from dual union all 3 select 11 from dual union all 4 select 12 from dual union all 5 select 13 from dual 6 ) 7 select 'id' col_id from dual 8 union all 9 select to_char(id) from t;COL_ID ---------------------------------------- id 10 11 12 13
SELECT COLUMN_NAME FROM User_Col_Comments WHERE table_name='TEMP' UNION ALL SELECT ID FROM TEMP
SQL> with t as(
2 select 10 id from dual union all
3 select 11 from dual union all
4 select 12 from dual union all
5 select 13 from dual
6 )
7 select 'id' col_id from dual
8 union all
9 select to_char(id) from t;COL_ID
----------------------------------------
id
10
11
12
13
UNION ALL
SELECT ID FROM TEMP