Collections:
SLEEP() - Holding Statement Execution
How to hold the statement execution for some time using the SLEEP() function?
✍: FYIcenter.com
SLEEP(sec) is a MySQL built-in function that
holds the execution of the current statement for sec seconds.
For example:
SELECT SYSDATE(), SLEEP(2), SYSDATE(); -- +---------------------+----------+---------------------+ -- | SYSDATE() | SLEEP(2) | SYSDATE() | -- +---------------------+----------+---------------------+ -- | 2023-12-16 23:46:02 | 0 | 2023-12-16 23:46:04 | -- +---------------------+----------+---------------------+
Reference information of the SLEEP() function:
SLEEP(sec): boolean Holds the execution for sec seconds and returns 0. Returns 1 if interrupted. Arguments, return value and availability: sec: Required. The number of seconds to hold. boolean: Return value. 0 if and only if it holds to end. Available since MySQL 4.0.
⇒ UPDATEXML() - Updating Child Element in XML
⇐ RELEASE_LOCK() - Release Lock Instance
2023-12-19, 1267🔥, 0💬
Popular Posts:
What Are Out-of-Range Errors with DATETIME values in SQL Server Transact-SQL? When you enter DATETIM...
How To Create a Table Index in Oracle? If you have a table with a lots of rows, and you know that on...
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into...
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ......
How To Divide Query Output into Multiple Groups with the GROUP BY Clause in SQL Server? Sometimes, y...