Overblog
Edit post Follow this blog Administration + Create my blog

Time Delay to Execute a T-SQL Query

March 17 2010 , Written by Balavardhan Reddy Published on #SQL Server2005




A New feature in SQL Server is Time delay to execute a T-SQL Query
SQL Server will wait for perticular time to excute the query.

Ex :
i) SELECT GETDATE() CurrentTime
WAITFOR DELAY '00:00:20' ---- 5 Second Delay
SELECT GETDATE() CurrentTime


Ex:
ii)
DECLARE @delaytime DATETIME
SET @delaytime = DATEADD(s,20,GETDATE())
SELECT GETDATE() CurrentTime
WAITFOR TIME @delaytime
SELECT GETDATE() CurrentTime


--

Share this post
Repost0
To be informed of the latest articles, subscribe:
Comment on this post
O
<br /> Nice post , thanks for sharing this beautiful information<br />
Reply
O
<br /> nice blog<br />
Reply
T
<br />  You surely helped me with my research. I will be strolling around and I will see if I can find other valuable resources. But you can be sure that I will recommend this site to my<br /> classmates. More power and I hope to see more developments coming. <br />
Reply
B
<br /> Very nice share. Thanks for posting.<br />
Reply
S
<br /> Great Blog I am Certified to your blog Because I have Searched and visited blog contents are Unique. if your blog were not post unique so I would not post my comment.<br />
Reply