Time Delay to Execute a T-SQL Query
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
To be informed of the latest articles, subscribe:
Comment on this post
O
O
T
B
S