declare @d datetime set @d=getdate() select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate()) 转载于:https://www.cnblogs.com/jgjgjg23/archive/2011/02/24/1963705.html