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

Select Top .... ?

Status
Not open for further replies.

Kinl

Programmer
Mar 19, 2001
168
US
I want to select the top 20 records from my table, but I dont know how to do it. I know you can do it in SQL Server, but I'm still new to mySQL.

How would you select the top 10 records of a table based on a where clause?

This is how i'd do it in SQL Server.:

select top 10 fname from Customers

How can i do this in mySQL?

Thanx

shorty
 
try this one

select fname from Customers LIMIT 10[color]

or equiv

select fname from Customers LIMIT 0, 10[color]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top