HomeSQL ServerWAITFOR TIME in SQL Server

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

You May Also Like

When dealing with a relational database management system (RDBMS) like SQL Server, compatibility level is an important concept to understand....
In this blog post, let’s learn about the error message “49975 – Unable to load controller client certificate due to...
In this blog post, let’s learn about the error message “49973 – Cannot remove tempdb remote file to local tempdb...