Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oracle分页问题 #18

Open
hoperuin opened this issue Jul 14, 2016 · 0 comments
Open

Oracle分页问题 #18

hoperuin opened this issue Jul 14, 2016 · 0 comments

Comments

@hoperuin
Copy link

请问这段代码这样实现的意义?
if (offset > 0) {
pagingSelect.append("select * from ( select row_.*, rownum rownum_ from ( ");
}
else {
pagingSelect.append("select * from ( ");
}
现在出现的问题是:由于第一次第二次分页查询SQL不一样,出现分页不正确的问题,检查发现rownum错乱,如果把SQL追加order by 则可以解决这个问题,不加的情况下会出现这个问题,目前遇到的是多表查询。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant