Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you restrict resultset to return only one row? 2

Status
Not open for further replies.

password99

Technical User
Jul 19, 2002
122
US
how do you restrict select resultset to return only one row?
 
Select Top 1 * from WhatEver where SomeCondition etc.
-Karl
 
I'm not quite sure this is what ou mean but:

"select top 1 * from table_name" will get you one row. You can add the usual where and order by stuff to pare it down.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top