mysql limit paging technology attention problems


 limit syntax:

              select *from table limit value 1, value 2

Note: Value 1, Value 2 cannot be expressions or variables

otherwise there will be an error

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(1-1)*3,3'

at line 1。

 

 

 

This way of writing it will not go wrong:

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326605806&siteId=291194637