我是靠谱客的博主 明理耳机,这篇文章主要介绍返回SQL执行时间的存储过程,现在分享给大家,希望可以做个参考。

复制代码 代码如下:

USE NBDXMIS
CREATE proc TestTimeAnySentence
@sql_where varchar(8000)
as
declare @ct datetime
set @ct = getdate()
declare @newsql_where varchar(8000)
set @newsql_where=@sql_where
exec(@newsql_where)
select datediff(ms, @ct ,getdate()) as '查询时间(毫秒)'
go
TestTimeAnySentence 'select * from 水费表 where 费用ID<200000'

最后

以上就是明理耳机最近收集整理的关于返回SQL执行时间的存储过程的全部内容,更多相关返回SQL执行时间内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(106)

评论列表共有 0 条评论

立即
投稿
返回
顶部