declare @q datetime set @q = getdate() selectID,U_Name,U_Sex,U_Age,U_Address from test1 where U_Name like '我%' select [like执行花费时间(毫秒)]=datediff(ms,@q,getdate()) declare @w datetime set @w = getdate() selectID,U_Name,U_Sex,U_Age,U_Address from test1 where charindex('我',U_Name) >0 select [charindex执行花费时间(毫秒)]=datediff(ms,@w,getdate())
这篇文档对您是否有帮助?