declare @d datetime
set @d=getdate()
--execute sql script
--demo
--select * from [table]
select [Use Times:]=datediff(ms,@d,getdate())
set @d=getdate()
--execute sql script
--demo
--select * from [table]
select [Use Times:]=datediff(ms,@d,getdate())