locacoes
table, which SQL command would display between the tenth and twentieth registers of this table, sorted by field titulo
?
locacoes
table, which SQL command would display between the tenth and twentieth registers of this table, sorted by field titulo
?
SELECT * FROM locacoes ORDER BY titulo LIMIT 9,10;
You do not have much information but that's probably it.
In this case you do not use WHERE
because you do not need to filter anything. Use ORDER BY
to set sort and LIMIT 9,10
to get the tenth result and the next 10. It uses the numeric 9 to indicate the initial element because it starts from 0, so if the first one is 0 the tenth is 9.