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

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - 单车骑客

安装vs2005 sp1 出现错误1718,文件未通过数字签名检查,解决方法 HTML:scrollLeft,scrollWidth,clientWidth,offsetWidth之完全详解(转载) 为新闻标题加颜色 - 单车骑客 - 博客园 GridView中如何做删除提示信息 GridView绑定多个参数值 - 单车骑客 - 博客园 Url重写 解决“不重新发送信息,则无法刷新新网页”的方案 - 单车骑客 - 博客园 powerdesigner将PDM转换到OOM时,code与name同时同步转换 Powerdesgner数据模型设计中,属性名同名问题的解决方法 正则表达式30分钟入门教程(转) asp.net页面生命周期 scrollWidth,clientWidth等区别 用js删除表中一行 SQL函数:分离字符串,并返回分离后字符的表 提供一个获取高精度时间类(转) SQL2005如何进行分页?? SQL中,内连接,外连接的书写格式 javascript正则表达式 下拉菜单
存储过程中如何处理分页
单车骑客 · 2008-08-07 · via 博客园 - 单车骑客

存储过程中处理分页的方法如下:

1。利用Not In和SELECT TOP分页

SELECT TOP 页大小 *
FROM T表
WHERE (ID NOT IN
          (
SELECT TOP 页大小*页数 id
         
FROM 表
         
ORDER BY id))
ORDER BY ID

2。利用ID大于多少和SELECT TOP分页

SELECT TOP 页大小 *
FROM 表
WHERE (ID >
          (
SELECT MAX(id)
         
FROM (SELECT TOP 页大小*页数 id
                 
FROM 表
                 
ORDER BY id) AS T))
ORDER BY ID

用这种方法时,先要判断页数,如果页数,如果页数为第一页的,直接用 select top 页大小 * from 表