I am providing search functionality in my website, when user searches a record then I want to display the time the query taken to get the results same as google does. When w
declare @sttime datetime
set @sttime=getdate()
print @sttime
Select * from ProductMaster
SELECT RTRIM(CAST(DATEDIFF(MS, @sttime, GETDATE()) AS CHAR(10))) AS 'TimeTaken'