lunes, 5 de abril de 2010

Need to wait to execute a TSQL in SQL Server?

If you are running tests on a SQL Server database using scripts, usually you may have to create a batch of TSQL and they must be executed in a certain order and in a certain time, to achive this you can use the WAITFOR DELAY statament, it allows your script to wait N seconds before being executed. In the following script we wait 30 seconds before executing the getdate command.


WAITFOR DELAY '00:00:30' ---- 30 Seconds Delay




Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server Tags: SQL Server

No hay comentarios:

Publicar un comentario