hi iam executing this query
select * from orders where Freight=71.97 and 250 > (select count(*) from orders where employeeid=Shipvia)
aginst northwind database of a sqlserver along with the result of this query i want time taken to execute this query in one column
please help me on this
Loading

Karan Patel120 reputationPosted Mar 4, 2010, 1:39 AM EST
==================================
Stopwatch sw = new Stopwatch();
sw.Start();
// your sql query and your further task
sw.Stop();
MessageBox.Show(sw.Elapsed.ToString());
Pramod Kumar NandagiriRank #6,963 · 252 reputationPosted Mar 4, 2010, 4:25 PM EST
thats why i want to get the time of execution of a query from the sql management studio it self
plese tell me if any commands or function r there to get the executiontime from the sql mamnangement studio please tl\
kiran kumarRank #3,110 · 461 reputationPosted Mar 5, 2010, 1:23 AM EST
DECLARE @startTime datetime,@endTime datetime SELECT @startTime=GETDATE() select * from orders where Freight=71.97 and 250 > (select count(*) from orders where employeeid=Shipvia) SELECT @endTime=GETDATE() SELECT DATEDIFF(ms,@startDate,@endDate) AS [Duration in millisecs]Ashish SrivastavaRank #2,169 · 655 reputationPosted Mar 29, 2016, 1:42 AM EDT
select * from orders where Freight=71.97 and 250 > (select count(*) from orders where employeeid=Shipvia) SELECT @endTime=GETDATE() SELECT DATEDIFF(ms,@startDate,@endDate) AS [Duration in millisecs]