declare @d datetime set @d=getdate() 并在select语句后加: select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate()) 转载于:https://www.cnblogs.com/hacker84/archive/2009/06/23/1509545.html