SELECT 'welcome' col1,
'to' col2,
'oracle' col3,
'class' col4
FROM dual;
SELECT * FROM (
SELECT
'welcome' col1,
'to' col2,
'oracle' col3,
'class' col4
FROM
dual)
UNPIVOT(column_val for column_name IN (col1,col2,col3,col4));
SELECT
*
FROM
(
SELECT
ename,
To_char(empno) empno,
job
FROM
emp
)
UNPIVOT ( column_val for column_name IN ( ename,empno,job ));
No comments:
Post a Comment