Unpivot using order by clause
shiva887May 15 2013 — edited May 16 2013Hello everyone , can somebody please explain the difference in the VALUE column when DESCRIPTION = 'dept' when the query is run with and without the order by clause.
SELECT * FROM
(
SELECT * FROM emp
--ORDER BY job
)UNPIVOT (VALUE FOR DESCRIPTION IN (sal AS 'salary', deptno AS 'dept'));