Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ordinal number
Message
 
 
To
29/05/2015 15:47:23
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Environment versions
SQL Server:
SQL Server 2014
Application:
Web
Miscellaneous
Thread ID:
01620360
Message ID:
01620363
Views:
50
>I'm extracting rows from a table and ordering the result based on idcol, an identity column.
>I want to add a column to the resultant set that shows what position the row holds in the set.. 1, 2, 3, etc.
>How best to do that?

Check ROW_NUMBER() function in BOL.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform