Q

Retrieving the first two rows in a table

SQL Server Development expert Greg Low explains how to retrieve the first two rows in a table in SQL Server 2000.

How do I retrieve the first two rows in a table?
In SQL Server 2000 or later you use the TOP statement. For example:

SELECT TOP 2 * FROM authors ORDER BY au_lname,au_fname

View questions and answers from all of our SQL Server experts here.

This was last published in March 2006

PRO+

Content

Find more PRO+ content and other member only offers, here.

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.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close