惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
爱范儿
爱范儿
T
The Exploit Database - CXSecurity.com
量子位
T
Tailwind CSS Blog
T
Threatpost
The GitHub Blog
The GitHub Blog
AWS News Blog
AWS News Blog
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
P
Proofpoint News Feed
博客园 - 司徒正美
L
LangChain Blog
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
S
Secure Thoughts
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
H
Hacker News: Front Page
T
Troy Hunt's Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
W
WeLiveSecurity
A
Arctic Wolf
Apple Machine Learning Research
Apple Machine Learning Research
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
P
Proofpoint News Feed
T
Tor Project blog
T
The Blog of Author Tim Ferriss
I
Intezer
P
Privacy & Cybersecurity Law Blog
美团技术团队
N
Netflix TechBlog - Medium
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Vulnerabilities – Threatpost
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
Attack and Defense Labs
Attack and Defense Labs
T
Tenable Blog
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
腾讯CDC
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI

博客园 - qdzhbsh

SQL Server 2008 R2版本号说明 电脑快捷键大全 ASP.NET控件命名惹得祸 Oracle中的自动生成guid和系统时间的函数 “从服务器返回了一个参照”错误的说明 SQL Server 2008镜像小结 在PL/SQL中使用“select * from 表名”返回的结果集是无序的 PL/SQL中的字符串连接符和转换函数 数据库做了镜像后,Web应用中Web.config的数据库连接串配置 SQL Server 2008版本号说明 SQL Server 2005版本号说明 SQL Server日志传送的三个角色与四个步骤 合并发布报“合并代理失败”错误的解决方法 重建一个发布和订阅的步骤 重建一个发布和订阅总是不成功的原因 工作站与主域间的信任关系失败的解决方法 循环冗余错误的解决 IIS宿主写文件时报对路径的访问被拒绝的解决方法 VS2008安装问题
支持Oracle的列表控件分页使用的SQL
qdzhbsh · 2010-12-03 · via 博客园 - qdzhbsh

     这段时间,公司有个新项目其数据库使用Oracle,对原先支持SQL Server数据源的列表控件进行了调整,现把分页使用的静态SQL语句提供如下:

--按code,num列正序排列的1-15条数据 第1页
   
SELECT code,num,title,contents,remark,snum FROM
(
    SELECT ROWNUM QDZHBSH_RECNO,code,num,title,contents,remark,snum FROM
    (SELECT code,num,title,contents,remark,snum FROM sys_code ORDER BY code,num asc)
    WHERE ROWNUM <= (1 + 15 - 1)
    ORDER BY ROWNUM ASC
)
WHERE QDZHBSH_RECNO BETWEEN 1 AND (1 + 15 - 1)
   
--按code,num列正序排列的16-30条数据 第2页
   
SELECT code,num,title,contents,remark,snum FROM
(
       SELECT ROWNUM QDZHBSH_RECNO, code,num,title,contents,remark,snum FROM
      (SELECT code,num,title,contents,remark,snum FROM sys_code ORDER BY code,num asc)
      WHERE ROWNUM <= (16 + 15 - 1)
      ORDER BY ROWNUM ASC
)
WHERE QDZHBSH_RECNO BETWEEN 16 AND (16 + 15 - 1)    
   

--按code,num列正序排列的31-45条数据 第3页
   
SELECT code,num,title,contents,remark,snum FROM
(
       SELECT ROWNUM QDZHBSH_RECNO, code,num,title,contents,remark,snum FROM
      (SELECT code,num,title,contents,remark,snum FROM sys_code ORDER BY code,num asc)
      WHERE ROWNUM <= (31 + 15 - 1)
      ORDER BY ROWNUM ASC
)
WHERE QDZHBSH_RECNO BETWEEN 31 AND (31 + 15 - 1)