问题
I have MySql Workbench 6.2CE (hope this helps..) And I'm trying to an offset query like this :
SELECT id FROM nameTable OFFSET 10 ROWS;
But it give me a syntax error on the 10 : is not a valid input in this position. Anyone knows the problem ?Thank you!
回答1:
The syntax is wrong and its
select * from table order by someid
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
https://dev.mysql.com/doc/refman/5.0/en/select.html
Note that limit without order by is having no meaning.
SELECT id FROM nameTable order by id limit 10 OFFSET 10
来源:https://stackoverflow.com/questions/30319131/mysql-offset-query-not-working