Showing posts with label Sleep Function in SQL Server. Show all posts
Showing posts with label Sleep Function in SQL Server. Show all posts
StumbleUpon
Share on Facebook

Wednesday, December 23, 2009

How to set delay in SQL Server 2008 / How to Set Sleep Time in SQL Server

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

Related Posts Plugin for WordPress, Blogger...