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中,连接只是客户进程和数据库实例之间的一条特殊线路,最常见的就是网络连接。这条连接可能连接到一个专用服务器进程,也可能连接到调度器。如前所述,连接上可以有0个或多个会话,这说明可以有连接而无相应的会话。另外,一个会话可以有连接也可以没有连接。使用高级Oracle N ......
数据库版本:9.2.0.5
有时候我们可能不知道一个用户的密码,但是又需要以这个用户做一些操作,又不能去修改掉这个用户的密码,这个时候,就可以利用一些小窍门,来完成操作。
具体操作过程如下:
SQL*Plus: Release 9.2.0.5.0 - Production on 星期日 11月 21 13:32:34 2004
Copyright (c) 1982, ......
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 ......
select * from sys.smon_scn_time;
--scn 与时间的对应关系
每隔5分钟,系统产生一次系统时间标记与scn的匹配并存入sys.smon_scn_time表。
select * from student as of scn 592258
就可以看到在这个检查点的表的历史情况。
然后我们恢复到这个检查点
insert into student select * from student a ......