October 2008
Beginner to intermediate
1024 pages
31h 30m
English
In SQL Server 2000, WAITFOR waited for a specified duration or a supplied datetime value. Starting with SQL Server 2005, as with the TOP enhancements, you can use WAITFOR with a SQL expression. You can essentially use the WAITFOR function to wait for a T-SQL statement to affect at least one row. (You can also set a time-out on that SQL expression.) You can specify WAITFOR to wait not only in SELECT statements but also in INSERT, UPDATE, DELETE, and RECEIVE statements. In essence, SELECT statements won’t complete until at least one row is produced, and data manipulation language (DML) statements won’t complete until at least one row is affected.
Here is the syntax:
WAITFOR(<statement>) [,TIMEOUT <timeout_value>]
This feature ...
Read now
Unlock full access