SQL SERVER – Delay Command in SQL Server – SQL in Sixty Seconds #055

Have you ever needed WAIT or DELAY function in SQL Server?  Well, I personally have never needed it but I see lots of people asking for the same. It seems the need of the function is when developers are working with asynchronous applications or programs. When they are working with an application where user have to wait for a while for another application to complete the processing.

If you are programming language developer, it is very easy for you to make the application wait for command however, in SQL I personally have rarely used this feature.  However, I have seen lots of developers asking for this feature in SQL Server, hence I have decided to build this quick video on the same subject.

We can use WAITFOR DELAY ‘timepart‘ to create a SQL Statement to wait.

Let us see the same concept in following SQL in Sixty Seconds Video:

Related Tips in SQL in Sixty Seconds:

What would you like to see in the next SQL in Sixty Seconds video?

Reference: Pinal Dave (https://blog.sqlauthority.com)

Solarwinds
, , ,
Previous Post
SQL – Difference Between INNER JOIN and JOIN
Next Post
SQL SERVER – Auditing and Profiling Database Made Easy with ApexSQL Trigger and ApexSQL Audit

Related Posts

3 Comments. Leave new

  • hmm.. making videos of all your previous blogs.. nice

    Reply
  • Another need happens quite often when you would like to simulate traffic / complex queries in your solution to find out “hot spots” with large number of db calls (for example when using ORM since it is not clearly visible how many queries are fired ). With the delay you can easily see where program explodes and keep on profiling detailed parts of code.

    Reply

Leave a Reply

Menu