手机
当前位置:查字典教程网 >编程开发 >mssql数据库 >返回SQL执行时间的存储过程
返回SQL执行时间的存储过程
摘要:复制代码代码如下:USENBDXMISCREATEprocTestTimeAnySentence@sql_wherevarchar(8000...

复制代码 代码如下:

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 Server 2008 存储过程示例

AspNetPager分页控件 存储过程

在SQL Server启动时自动执行存储过程。第1/2页

SQLServer中的存储过程

SQL Server 大量数据的分页存储过程代码

SQL Server存储过程的基础说明

模糊查询的通用存储过程

SqlServer创建存储过程

SQL Server下几个危险的扩展存储过程

Sql Server 创建存储过程

精品推荐
分类导航