您的位置:首页 > 数据库

在查询分析器中显示SQL语句的精确执行时间

2012-04-12 11:27 197 查看
declare @time datetime --定义时间变量

set @time = getdate() --给变量赋值

select * from xx --执行sql语句

select datediff(ms,@time,getdate()) --显示执行精确时间

或者

print datediff(ms,@time,getdate())
http://blog.csdn.net/poolord/article/details/6263688
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: