返回SQL执行时间的存储过程
时间:2024-01-16 15:22:06
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,执行时间
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
MSSQL报错:参数数据类型 text 对于 replace 函数的参数 1 无效的解决办法
2024-01-27 09:04:15
TypeScript学习之强制类型的转换
2024-04-25 13:08:07
Python轻松管理与操作文件的技巧分享
2021-11-19 14:42:12
Python中在for循环中嵌套使用if和else语句的技巧
2022-10-08 17:44:50
mysql 一个较特殊的问题:You can't specify target table 'wms_cabinet_form'
2024-01-24 19:07:13
GoLang nil与interface的空指针深入分析
2024-02-18 01:58:50
![](https://img.aspxhome.com/file/2023/4/105154_0s.png)
Python虚拟环境venv用法详解
2023-10-26 12:37:12
![](https://img.aspxhome.com/file/2023/7/121057_0s.png)
详解Python3的TFTP文件传输
2023-06-01 22:29:17
![](https://img.aspxhome.com/file/2023/6/87896_0s.png)
python中常见进制之间的转换方式
2021-08-15 13:27:48
flask 实现上传图片并缩放作为头像的例子
2021-09-08 06:32:42
交互设计实用指南系列(1) – “有效性”之“操作入口明确”
2009-12-11 18:42:00
![](https://img.aspxhome.com/file/UploadPic/200912/11/door-24s.png)
mysql实现多表关联统计(子查询统计)示例
2024-01-19 18:53:26
![](https://img.aspxhome.com/file/2023/7/129917_0s.png)
浅谈怎么给Python添加类型标注
2023-11-21 05:16:17
![](https://img.aspxhome.com/file/2023/1/124091_0s.png)
亚马逊购物用户体验分析(三)
2009-10-25 12:53:00
![](https://img.aspxhome.com/file/UploadPic/200910/25/navigational-elements-95s.jpg)
Python将二维列表list的数据输出(TXT,Excel)
2021-06-11 05:23:20
![](https://img.aspxhome.com/file/2023/5/95165_0s.png)
PHP PDOStatement::closeCursor讲解
2023-06-07 18:23:31
oracle chm帮助文件下载
2024-01-21 21:08:01
Dreamweaver2004 中文乱码解决方案
2007-01-31 10:20:00
![](https://img.aspxhome.com/file/UploadPic/20071/2007131102058101s.gif)
Go 防止 goroutine 泄露的方法
2024-04-26 17:26:28
Python 更快进行探索性数据分析的四个方法
2021-01-15 05:22:31
![](https://img.aspxhome.com/file/2023/7/133387_0s.png)