select语句前加: declare @d datetime set @d=getdate() 并在select语句后加: select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())