Oracle

Controlling the Order of Rows

Figo Kim 2006. 9. 1. 22:50
COLUMN a_dummy NOPRINT
SELECT 'sing' AS "My Dream", 3 a_dummy
FROM dual
UNION
SELECT 'I''d like to teach', 1 a_dummy
FROM dual
UNION
SELECT 'the world to', 2 a_dummy
FROM dual
ORDER BY a_dummy;

ORDER BY clause can be used only once in a compound query and it should be placed at the very end of the query.


COLUMN : You can use this command to customized column headings.