WAITFOR statement used to delay execution of T-SQL command for a specified period of time. This can be used to block the execution of batch statement, stored procedure and T SQL commands for a specified time.
There are two parameters can be used with WAITFOR statement.
Let us create simple stored procedure
Let us execute above stored procedure after delay of 1 minute
In above query we are using delay with WAITFOR.
Above query will execute stored procedure at 10.06PM. Time we will need to provide on scale of 24 hrs. For 1 Pm we need to give input as 13.00.