网络编程
位置:首页>> 网络编程>> 数据库>> 返回SQL执行时间的存储过程

返回SQL执行时间的存储过程

  发布时间:2024-01-16 15:22:06 

标签: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'
0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com