Home » SQL & PL/SQL » SQL & PL/SQL » problem in ordering query
problem in ordering query [message #355113] Wed, 22 October 2008 13:33 Go to next message
emadnabil
Messages: 163
Registered: August 2007
Senior Member
Hii all,

i have this query
SELECT NULL DESCRIPTION FROM DUAL
UNION ALL
SELECT DESCRIPTION FROM ITEMS
ORDER BY DESCRIPTION 


i want the null value to be in the begining of the result
and the remaining is order by the "description" column

how can i do this?

Re: problem in ordering query [message #355114 is a reply to message #355113] Wed, 22 October 2008 13:44 Go to previous message
joicejohn
Messages: 327
Registered: March 2008
Location: India
Senior Member
@emadnabil,

Use NULLS FIRST in your ORDER BY Clause.

Hope this helps.

(***Added:- Found this Link in Orafaq which I thought might be useful for you)
Regards,
Jo

[Updated on: Wed, 22 October 2008 13:47]

Report message to a moderator

Previous Topic: Schema analyzed
Next Topic: Union All
Goto Forum:
  


Current Time: Sat Dec 10 09:04:42 CST 2016

Total time taken to generate the page: 0.06670 seconds