get the execution time of a sql statement.
declare @d datetime
set @d = GETDATE()
select * from dbo.spt_values
select [语句执行花费时间(毫秒)]= DATEDIFF(ms,@d,getdate())
I work for software testing.
declare @d datetime
set @d = GETDATE()
select * from dbo.spt_values
select [语句执行花费时间(毫秒)]= DATEDIFF(ms,@d,getdate())