易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle 笔记 VII 之 大数据量下的分页

 在ORACLE 大数据量下的分页解决方法。一般用截取ID 方法,还有是三层 嵌套方法
一种分页方法
<%
    int i = 1;
    int numPages = 14;
    String pages = request.getParameter("page");
    int currentPage = 1;
    currentPage = (pages == null)?1:Integer.parseInt(pages);
    sql = "select count(*) from tables";
    ResultSet rs = DBLink.executeQuery(sql);
    
    第36页 共 59 页
    while(rs.next())
     i = rs.getInt(1);
     int PageCount = 1;
     PageCount = (i%numPage == 0) ?(i/numPages):(i/numPages+1);
     int nextPage;
     int up Page;
     nextPage = currentPage + 1;
    if(nextPage > = PageCount)
     nextPage = PageCount;
     upPage = currentPage - 1;
     if(upPage <=1)
      upPage = 1;
      rs.close();
 
      sql="select * from tables";
      rs = DBLink.executeQuery(sql);
      i = 0;
      while((i<numPages*(currentPage-1)) && rs.next())
        { i++;}
 
 
//输出内容
//输出翻页连接
 
合计:<%=currentPage%>/<%=intPageCount%>页
        <a href="List.jsp?page=1">第一页</a>
        <a href="List.jsp?page=<%=upPage%>">上一页</a>
 
<%
      for(int j=1;j<PageCount;j++){
          if(currentPage != j)
     &


相关文档:

Oracle 批处理启动关闭服务

 Oracle在自己机器上装一个有必要的,毕竟有时候需要自己在家学习一下,但电脑不是自己用的,还是写个批处理解决一下,需要的时候点击一下启动,不需要就停止,很方便。这里将脚本给大家写一个,欢迎大家粘贴拷贝。
首先,自己先将自己的自动启动服务关闭,并记录一下,然后替换脚本中相应的服务名称即可。自己粘贴出 ......

SQL语言基础考核(二)(oracle)

 2.根据Oracle 数据库scott 模式下的emp 表和dept 表,完成下列操作:
      (1) 查询20号部门的所有员工信息;
      (2) 查询所有工种为CLERK 的员工的员工号、员工名和部门号;
      (3) 查询奖金COMM 高于工资SAL 的员工信息;
  ......

110个oracle常用函数总结

 1. ASCII
返回与指定的字符对应的十进制数;
SQL> select ascii(A) A,ascii(a) a,ascii(0) zero,ascii( ) space from dual;
A A ZERO SPACE
--------- --------- --------- ---------
65 97 48 32

2. CHR
给出整数,返回对应的字符;
SQL> select chr(54740) zhao,chr(65) chr65 from ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号