declare @time datetime set @time=getdate()
然后在sql執(zhí)行語句后加上:
select [語句執(zhí)行花費(fèi)時間(毫秒)]=datediff(ms,@time,getdate())