Saturday, July 23, 2011

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

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Deep's | Bloggerized by Deep - Deep's Templates | ElearSQL-Server