6、oracle迁移到postgres-分页问题

站着说话不腰疼 / 2023-08-23 / 原文

目录
  • oracle迁移到postgres-分页问题
    • 1、oracle使用rownum进行分页
    • 2、postgres使用limit进行分页
    • 3、使用FETCH统一的分页方式

oracle迁移到postgres-分页问题

1、oracle使用rownum进行分页

select * from ss_stu where rownum <= 10;

2、postgres使用limit进行分页

select * from ss_stu limit 10;

3、使用FETCH统一的分页方式

select * from ss_stu FETCH NEXT 1 ROWS ONLY