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

推荐订阅源

W
WeLiveSecurity
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Register - Security
The Register - Security
Stack Overflow Blog
Stack Overflow Blog
博客园 - 三生石上(FineUI控件)
T
Threat Research - Cisco Blogs
S
SegmentFault 最新的问题
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
P
Proofpoint News Feed
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
C
Cybersecurity and Infrastructure Security Agency CISA
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
U
Unit 42
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Cloudflare Blog
H
Help Net Security
Recent Announcements
Recent Announcements
P
Privacy & Cybersecurity Law Blog
IT之家
IT之家
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 热门话题
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
H
Heimdal Security Blog
博客园 - 聂微东
S
Securelist
大猫的无限游戏
大猫的无限游戏
Cloudbric
Cloudbric
Cisco Talos Blog
Cisco Talos Blog

博客园 - 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)