Geeks Talk

Prepare for your Next Interview




Is Order by on Rownum Possible

This is a discussion on Is Order by on Rownum Possible within the SQL forums, part of the Databases category; Can we use order_by on a rownum. Will this give me error? If not what would be the result like. Anyone who has tried this give your inputs here in ...


Go Back   Geeks Talk > Databases > SQL

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-29-2006
Contributing Member
 
Join Date: Jul 2006
Posts: 52
Thanks: 0
Thanked 1 Time in 1 Post
Bessie is on a distinguished road
Is Order by on Rownum Possible

Can we use order_by on a rownum. Will this give me error? If not what would be the result like. Anyone who has tried this give your inputs here in this discussion.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-17-2006
Expert Member
 
Join Date: Jun 2006
Location: India
Posts: 411
Thanks: 15
Thanked 32 Times in 24 Posts
jamesravid is on a distinguished road
Re: Is Order by on Rownum Possible

You can order the result set by ROWNUM. But it will make no sense if you order by rownum in ascending order (i hope you understand this statement).
order by rownum in descending displays records in reverse order.

--James.
Reply With Quote
Reply

  Geeks Talk > Databases > SQL


Thread Tools
Display Modes



All times are GMT -4. The time now is 06:51 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved