Quote:
Originally Posted by bchanan
will it not select the first 5 records, and then sort them by id (desc) ?
|
no
if it doesn't sort them first, then how does it figure out which ones are "first" ??
the ORDER BY happens first, then the LIMIT is applied
Quote:
Originally Posted by bchanan
PS: will it make any diffrence if I would have run this:
select * from my_table order by id desc limit 5,10
|
yes, it will -- it will return different rows than LIMIT 1,5