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

推荐订阅源

Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
宝玉的分享
宝玉的分享
博客园_首页
量子位
博客园 - 司徒正美
罗磊的独立博客
腾讯CDC
IT之家
IT之家
S
Schneier on Security
Hugging Face - Blog
Hugging Face - Blog
L
Lohrmann on Cybersecurity
H
Hacker News: Front Page
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
Know Your Adversary
Know Your Adversary
人人都是产品经理
人人都是产品经理
有赞技术团队
有赞技术团队
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
Spread Privacy
Spread Privacy
I
InfoQ
T
Threatpost
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
L
LINUX DO - 热门话题
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
Latest news
Latest news
Forbes - Security
Forbes - Security
Security Latest
Security Latest
NISL@THU
NISL@THU
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
The Hacker News
The Hacker News
M
MIT News - Artificial intelligence
S
SegmentFault 最新的问题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
B
Blog
A
Arctic Wolf
C
Check Point Blog
G
Google Developers Blog
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
The Cloudflare Blog
L
LINUX DO - 最新话题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
P
Privacy International News Feed
小众软件
小众软件

博客园 - 蝗虫的大腿

IOS UITest 初始化 ViewController wp8.1 sdk preview 预览版 windows phone 网络开发三部曲(一)各种包的各种抓法 Windows phone UI虚拟化和数据虚拟化(二) Windows phone UI虚拟化和数据虚拟化(一) LongListSelector 控件 在 wp7 和wp8中的不同之处 wp8 longlistselector 动态加载datatemplate windows phone 设计时 数据源 xna 触控操作 备忘 windows phone 在代码中生成ApplicationBar WP8多分辨率解决方案 wp8 模拟器启动失败的解决方法。 Xap 包装失败。未将对象引用设置到对象的实例。 解决办法 wp7 中Panorama控件 title 字体大小 样式的设置 不同服务器数据库之间的数据操作 jquery UI dialog 和 asp.net 控件 出错 失效 - 蝗虫的大腿 对于 抽象类 接口 的理解 http错误列表 常用的js正则表达式 - 蝗虫的大腿 - 博客园
在sql server 中执行带参数的存储过程及计算运行时间
蝗虫的大腿 · 2008-02-14 · via 博客园 - 蝗虫的大腿
  
   

--存储过程片断
ALTER PROCEDURE [dbo].[CurrentPageInfo]

-- 获得某一页的数据--

@beginNo int = 0,                      --起始记录号(即从哪一条开始取)

@count int = 100,                      --取的结果集的总数

@resultColumns varchar(2000) = '*',           --需要得到的字段(column1,column2,......)

@tableName varchar(2000),                 --需要查看的表名(from table_name)

@condition varchar(2000) = '',            --查询条件(where condition......) 不用加where关键字

@orderByColumn varchar(100) = '',         --排序的字段名(order by column asc/desc)

@orderByType bit = 0,                     --排序的类型(0为升序,1为降序)

@indentColumn varchar(50) = ''            --自增长列名称

AS...
--存储过程片断 End


--sql 语句
declare
@runTime datetime

set @runTime=getdate()

--exec 存储过程名 存储过程需要的参数,字符串用单引号括起,数字直接写,缺省用null代替

exec CurrentPageInfo 2,10,'bookid,bookname','bookinfo',null,'CreateTime',0,'ID'

select [语句执行花费时间(毫秒)]=datediff(ms,@runTime,getdate())