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, 1570🔥, 0💬
Popular Posts:
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can u...
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the...
How To Convert Numeric Values to Character Strings in MySQL? You can convert numeric values to chara...
What To Do If the StartDB.bat Failed to Start the XE Instance in Oracle? If StartDB.bat failed to st...
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...