我用rs.last();进行分页,sql语句为 select id,name,from A order by id asc;就一直执行不动 也不报错,CPU猛涨
如果sql是select * from A order by id asc;这个就没问题
sql是select id,name from A 没问题。
表结构A
id varchar2(20)
name varchar2(100) not null
[code="sql"]select id,name from A order by id asc[/code]
将这个语句,在数据的客户端运行下,看看效果
PS: “ 我用rs.last();进行分页” 是在查询后进行的吧?
[code="sql"]select id,name,from A order by id asc;[/code]
[b]
name后面多了个逗号[/b]
[b]这样就没问题了[/b]
[code="sql"]SELECT id , name FROM A ORDER BY id ASC;[/code]
你的Statement对象是如何声明的?
调试看看吧
把代码贴出来看看
statement设置为结果集可滚动的,看下api就明白了。