{"id":84,"date":"2010-07-16T07:19:42","date_gmt":"2010-07-16T07:19:42","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=84"},"modified":"2022-02-17T07:14:15","modified_gmt":"2022-02-17T07:14:15","slug":"waitfor","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/sql-server\/queries-microsoft-sql-server\/statements-general\/waitfor","title":{"rendered":"WAITFOR"},"content":{"rendered":"<p>Use to block execution. While executing a WAITFOR statement the transaction is running and no other requests can run under the same transaction. Bear in mind that if the server is busy the thread may not be immediately scheduled.<\/p>\n<pre><code>\r\n----Delay for 20 seconds\r\nWAITFOR DELAY '000:00:20'\r\nSELECT '20 Second Delay'\r\nGO\r\n----Delay till 7 AM\r\nWAITFOR TIME '7:00:00'\r\nSELECT 'Good Morning'\r\nGO\r\n<\/code><\/pre>\n<p>Resources:<\/p>\n<p><a href=\"http:\/\/blog.sqlauthority.com\/2007\/06\/18\/sql-server-delay-function-waitfor-clause-delay-execution-of-commands\/\">http:\/\/blog.sqlauthority.com\/2007\/06\/18\/sql-server-delay-function-waitfor-clause-delay-execution-of-commands\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use to block execution. While executing a WAITFOR statement the transaction is running and no other requests can run under the same transaction. Bear in mind that if the server is busy the thread may not be immediately scheduled. &#8212;-Delay for 20 seconds WAITFOR DELAY &#8216;000:00:20&#8242; SELECT &#8217;20 Second Delay&#8217; GO &#8212;-Delay till 7 AM [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-statements-general"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":85,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/84\/revisions\/85"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}