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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restrict the number of recordset results 1

Status
Not open for further replies.

FesterSXS

Programmer
Feb 4, 2002
2,196
GB
Simple one I'm sure but I've never actually used it so have no idea of the SQL syntax.

just need to limit the number of returned results from a SQL query

cheers in advance

Tony
reddot.gif WIDTH=400 HEIGHT=2 VSPACE=3

 
SELECT Top 10* FROM tblTest order by colName ASC

will give you the first 10 records from the tblTest. Is this the syntax you are looking for?
 
That is just to select all fields from the table. You could also name the column:

SELECT Top 10 ID, Name, Address FROM tblTest
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top