如果是oracle数据库,可以用rownum作为条件取数据的
解决方案 »
- ibatis,web开发查询求助!!!!!!!
- checkbox的问题
- 求解一难度相当的问题
- 我是新手,想请高人指点一下怎么学JSP,10点之前给分!
- 将数据库中的所有字段写成一个数组函数
- 分布式事务怎么写
- jsp连oracle的问题,出现异常java.sql.SQLException:Fail to convert to internal representation
- 关于数据库的事务提交???高手请进来看看!!
- 基于javax.swing.JApplet和java.applet.Applet的Applet有何区别?
- 大家来讨论一下jsp是怎样和servlet结合的?
- 请问jsp中定义hashtable是做什么用的
- 数据无法插入请高手看看,谢谢!!!
用hibernate嘛,hibernate.properties里边设定 fetch一次取20
检索时首先返回总记录数(总页数),然后:select * from xxx where id between x and y
其中:x,y由第n页及每页记录数决定
为什么一定要自己写呢
String sql = ''select .....where fieldname like ?''
PrepareStatement pstm = conn.prepareStatement(sql);
pstm.setString(1,someValue);
但这样一来产生的RS 不支持 rs.last();只好改为 Statement stmt =conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
这时候SQL 应按怎么写呀?