I have a requirement in Oracle query where my query is like
SELECT 'SELECTALL' , 'Select All' from dual union
select SUBS_TYPE ,SUBS_DESC from SM_SUBSCRIBER_TYPE
the above query should return "Select All" as first row and all rows which are retrieved by the second query should be order by upper(SUBS_DESC) so that "Select All" display in first row and remailing rows should display orderby description.
Or, if you use SQL*Plus, you might create additional column to use it in ORDER BY clause; don't display it using the COLUMN SQL*Plus command. Something like this:
SQL> -- note the NOPRINT option
SQL> column no noprint
SQL> select 1 no, 'SELECTALL' name, 'Select All' job from dual
3 select 2 no, ename, job from emp
4 order by no, job;
SELECTALL Select All
15 rows selected.