WAITFOR TIME in SQL Server

If you want to pause the execution of the code block until a specific time is reached , you can try using the WAITFOR TIME statement in SQL Server.

For example , you want the subsequent statement to execute at 10.10 am , here’s how the WAITFOR TIME can be used.

use AdventureWorks2014
GO
WAITFOR TIME ’10:10:00′;
select * from HumanResources.Department
go

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this blog post, let’s learn about the error message “1459 – An error occurred while accessing the database mirroring...
In this blog post, let’s learn about the error message “7937 – Columnstore index has one or more missing column...