Reputation: 3324
I want to limit the results of a query in MySQL. I want the query to search 5000 rows but return only 5 of the 50 that found. How is it possible to do this?
Any help appreciated.
Upvotes: 0
Views: 103
Reputation: 2376
This is pretty basic SQL stuff. Check out the LIMIT modifier. You want to do something like:
SELECT id FROM table LIMIT 5
Upvotes: 7