DECLARE @begin datetime
DECLARE @chaju bigint
DECLARE @end datetime
SET @begin=getdate()

要执行的sql语句......

SET @end=getdate()       
SELECT @chaju = datediff(Millisecond, @begin@end)
PRINT @chaju 

相关文章: