Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

ROW_NUMBER() - Order by Row order - not value?

Posted on 2010-08-23
1
Medium Priority
?
320 Views
Last Modified: 2012-05-10
I have a SQL 2005 query - with a ROW_NUMBER() - I do not want to order by any value - just by the default order of the rows returned - is that possible?
0
Comment
Question by:tbaseflug
1 Comment
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 2000 total points
ID: 33502447
Yes, then in the ORDER BY clause just place your Primary Keys or Clustered index key columns alone which would do as required.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Screencast - Getting to Know the Pipeline
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question