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

推荐订阅源

D
Docker
I
InfoQ
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
Y
Y Combinator Blog
博客园_首页
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
C
Check Point Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Engineering at Meta
Engineering at Meta
B
Blog
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
F
Fortinet All Blogs
月光博客
月光博客
GbyAI
GbyAI

博客园 - 快乐家++

QMT A股 量化程序开发资料 通过 PyWenCai 模块采集问财涨停数据的例子 均线粘合 【通达信】 MS-SQL事务处理语句 SQL Update:使用一个表的数据更新另一张表 CefSharp 使用备忘录 IIS7 伪静态 web.config 配置方法 针对不同.NET版本的条件编译 将Json数据 填充到 实例类 的函数 当鼠标经过表格数据行时颜色不同且奇偶行颜色也不同 (纯CSS) JavaScript 版本的 RSA加密库文件 电工葵花宝典 一开关接线方法 c# 执行javascript 脚本 HttpWebRequest出错 服务器提交了协议冲突. Section=ResponseHeader Detail=CR 后面必须是 LF 秒转换成时分秒 SQL2008中Merge的用法 C#将exe运行程序嵌入到自己的winform窗体中 如何让用户只能访问特定的数据库(MSSQL) 委托、回调 Lambda表达式书写方式
带查询参数 可分页 的 T-SQL 语句写法
快乐家++ · 2017-11-18 · via 博客园 - 快乐家++
DECLARE @keys nvarchar(200)
DECLARE @pageindex int
DECLARE @pagesize int
DECLARE @classid int

set @keys = ''
set @pageindex = 1;
set @pagesize = 20;
set @classid = 17;

with temptbl as (
    select ROW_NUMBER() OVER (ORDER BY B.iid desc)AS Row, A.className,B.*  
    from dl_PicClass A inner join  dl_PicFile B on a.iid = b.classid 
    where (@keys = '' or A.className like '%'+@keys+'%' or B.fName like '%'+@keys+'%'  )
    and (@classid<=0 or B.classid = @classid)
)
SELECT * FROM temptbl where Row between (@pageindex-1)*@pagesize+1 and (@pageindex-1)*@pagesize+@pagesize;

select COUNT(1)
    from dl_PicClass A inner join  dl_PicFile B on a.iid = b.classid 
    where (@keys = '' or A.className like '%'+@keys+'%' or B.fName like '%'+@keys+'%'  )
    and (@classid<=0 or B.classid = @classid)