get the execution time of a sql statement.

declare @d datetime
set @d = GETDATE()
select * from dbo.spt_values
select [语句执行花费时间(毫秒)]= DATEDIFF(ms,@d,getdate())

posted @ 2015-08-13 23:30  My_Litter_Princess  阅读(102)  评论(0编辑  收藏  举报