WAITFOR:
WAITFOR
used to pauses the execution of query from certain time.
There
are two type's of Wait for.
1.WAITFOR
DELAY
2.WAITFOR
TIME
WAITFOR
DELAY :
WAITFOR
DELAY Cause the execution to delay from specified duration. For
example it pause's the execution for 5 second's
Example
WAITFOR
DELAY
'00:00:05'
SELECT *
FROM
EMP
WAITFOR
TIME
:
WAITFOR
TIME is pause's the execution wait for specified time. For example
'13:15:00' whenever time reached the query will be executed.
WAITFOR
TIME
'13:15:00'
SELECT
*
FROM
EMP
SELECT
GETDATE()
Good Article Reakesh :)
ReplyDeleteExcellent., thank you
ReplyDelete