Q
Problem solve Get help with specific problems with your technologies, process and projects.

Method for retrieving SQL Server records similar to ROWNUM

I understand that there are no equivalent to ROWNUM in SQL Server. But, is there a method by which I can retrieve the records with some sort of numbering? For example,

 rec# col1 col2 col3 ---- ---- ---- ---- 1 a b c 2 d e f 3 g h i...
Do a search on SQL Server Magazine for Itzik Ben Gan. There are numerous articles out there that he has written on various permutations of the question you are asking.

Dig Deeper on Microsoft SQL Server Installation

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close