sqlserver里存储过程执行时间差的打印

declare @now31 DateTime
set @now31=getdate()

 


exec sp_executesql @sCondition,N'@sValueCondition varchar(512) output',@sValueCondition output

 


declare @now41 DateTime
set @now41=getdate()
print '起码时间差:'+cast(datediff(ms,@now31,@now41) as varchar)+'毫秒' +' 终端编号:'+cast(@sTerminalID as varchar)+'电表编号:'+@sElecMeterID

你可能感兴趣的:(sqlserver里存储过程执行时间差的打印)