Postgresql分页查询报错“LIMIT #,# syntax is not supported ”

使用SQL语句查询Postgresql数据库时报错:

LIMIT #,# syntax is not supported 建议:Use separate LIMIT and OFFSET clauses.

原因:

Postgresql不支持LIMIT #,#语法,建议使用 LIMIT and OFFSET clauses格式

解决方案:

//从0开始查10条数据
select * from table LIMIT 10 OFFSET 0

猜你喜欢

转载自blog.csdn.net/watson2017/article/details/131309050