ORACLE:- 'SELECT ORDER BY ASC' but 'USA' always first.
Posted
by Robert
on Stack Overflow
See other posts from Stack Overflow
or by Robert
Published on 2010-04-21T18:58:31Z
Indexed on
2010/04/21
20:33 UTC
Read the original article
Hit count: 167
oracle10g
I have to write a drop down query for countries. But USA should always be first. The rest of the countries are in alphabetical order I tried the following query
SELECT
countries_id
,countries_name
FROM get_countries
WHERE
countries_id = 138
UNION
SELECT
countries_id
,countries_name
FROM get_countries
WHERE
countries_id != 138
ORDER BY 2 ASC
© Stack Overflow or respective owner