LIMIT keeps only the first few rows
LIMIT 3 cuts the result down to three rows. On its own it just takes whichever three came first, so it usually follows ORDER BY: sort the rows the way you care about, then keep the top few. That pairing is how you ask for the best three.
A tiny example
In plain English: Show me the three students with the highest scores.
SELECT name, score
FROM students
ORDER BY score DESC
LIMIT 3;What comes back
| name | score |
|---|---|
| Nia | 98 |
| Theo | 91 |
| Ravi | 87 |
After sorting by score, LIMIT kept just the top three.
Related SQL lessons
Ready for a break?
Take on today's cozy puzzle. A fresh, bite-sized query waits every morning — no timers, no pressure.
play today's sip