Collections:
CURTIME() - Current Time
How to obtain the current time using the CURTIME() function?
✍: FYIcenter.com
CURTIME(prec) is a MySQL built-in function that returns the current time with a given precision of fractional seconds. For example:
SELECT CURTIME(), CURTIME()+1; -- +-----------+-------------+ -- | CURTIME() | CURTIME()+1 | -- +-----------+-------------+ -- | 11:49:40 | 114941 | -- +-----------+-------------+ SELECT CURTIME(6), CURTIME(6)+1; -- +-----------------+---------------+ -- | CURTIME(6) | CURTIME(6)+1 | -- +-----------------+---------------+ -- | 11:51:06.460932 | 115107.460932 | -- +-----------------+---------------+
Reference information of the CURTIME() function:
CURTIME(prec): tm Returns the current time as a value in 'hh:mm:ss.SSSSSS' or hhmmss.SSSSSS format, depending on whether the function is used in string or numeric context. Arguments, return value and availability: prec: Optional. Default is 0. The precision of fractional seconds. tm: Return value. The current time as a string or number. Available since MySQL 4.
Related MySQL functions:
⇐ CURRENT_TIMESTAMP() - Synonym for NOW()
2023-11-17, 274🔥, 0💬
Popular Posts:
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
What Happens to Your Transactions When ERROR 1213 Occurred in MySQL? If your transaction receives th...
What Is an Oracle Instance in Oracle? Every running Oracle database is associated with an Oracle ins...