There is a query like SELECT * FROM clients ORDER BY id
. I want to select only first 10 elements. How can I do this?
P.S. I'm using MySQL.
SELECT * FROM clients ORDER BY id LIMIT 10;
Note that OFFSET is very helpful to paginate:
LIMIT 10 OFFSET 11
for the second page of 10.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With