Sleep Function in SQL Server
T-SQL Statement WaitFor Delay can be used to set the sleep time in SQL batch. The following example sets one-minute sleep time
print getdate()
waitfor delay '00:01'
print getdate()
Here is the output:
Sep 15 2009 6:43AM
Sep 15 2009 6:44AM
No comments:
Post a Comment