ORACLE:- 'SELECT ODER 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 19:03 UTC
Read the original article Hit count: 110

Filed under:

I have to write a drop down query for countries. But USA hould 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

Related posts about oracle10g