declare @d datetimeset @d=getdate()/*你的SQL脚本开始*/SELECT [TestCase] FROM [TestCaseSelect] /*你的SQL脚本结束*/select [语句执行花费时间(毫秒)]=datediff(ms,@d,getdate())