Take a look at the WAITFOR command:
WAITFOR {DELAY 'time' | TIME 'time'}
where
DELAY
Instructs SQL Server to wait until the specified amount of time has passed, up to a maximum of 24 hours.
TIME
Instructs SQL Server to wait until the specified time.
time
Specifies a time in one of the acceptable formats for datetime data. The time you specify can include hours, minutes, and seconds. Use the format 'hh:mm:ss'. You cannot specify dates - the date portion of the datetime value is not allowed. You can also specify a local variable in place of the 'time' string. For details, see the Datatypes topic.
Remarks
After executing the WAITFOR statement, you cannot use your connection to SQL Server until the time or event that you specified occurs.
To see the active and waiting processes, use the sp_who system stored procedure.
Take a look at the WAITFOR command:
WAITFOR {DELAY 'time' | TIME 'time'}
where
DELAY
Instructs SQL Server to wait until the specified amount of time has passed, up to a maximum of 24 hours.
TIME
Instructs SQL Server to wait until the specified time.
time
Specifies a time in one of the acceptable formats for datetime data. The time you specify can include hours, minutes, and seconds. Use the format 'hh:mm:ss'. You cannot specify dates - the date portion of the datetime value is not allowed. You can also specify a local variable in place of the 'time' string. For details, see the Datatypes topic.
Remarks
After executing the WAITFOR statement, you cannot use your connection to SQL Server until the time or event that you specified occurs.
To see the active and waiting processes, use the sp_who system stored procedure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.