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