sql执行时间
declare @i as int declare @begintime as datetime set @begintime = getdate() set @i = 0 while @i < 100 begin insert into TestT (title,info,flag) values ('title'+cast(@i as varchar),'info'+cast(ceiling(rand() * 100) as varchar ),ceiling(rand() * 2)) set @i = @i + 1 end select datediff(ms,@begintime,getdate()) as '執行時間'