Lesson 13 / 37 · Ordering and limits
LIMIT without ORDER BY is a coin flip
LIMIT keeps "the first" rows, but without ORDER BY nothing defines first. It works today and changes tomorrow. dequery notes it on the LIMIT step.
The query
SELECT id, amount
FROM orders
LIMIT 3
Try adding ORDER BY id: the cut becomes stable, and the note on the LIMIT step goes away.
Next: INNER JOIN keeps only rows that find a partner · All lessons