CURRENT_TIMESTAMP¶
Returns the current date and time of the system.
Note
This function has a special ANSI SQL form and can be called without parentheses.
Syntax¶
CURRENT_TIMESTAMP() --> DATETIME
CURRENT_TIMESTAMP --> DATETIME
Arguments¶
None
Returns¶
The current system date and time, with type DATETIME
.
Notes¶
This function has a special ANSI SQL form and can be called without parentheses.
To get the date only, see CURRENT_DATE.
Examples¶
Get the current system date and time¶
master=> SELECT CURRENT_TIMESTAMP, CURRENT_TIMESTAMP(), SYSDATE, GETDATE();
getdate | getdate0 | getdate1 | getdate2
--------------------+---------------------+---------------------+--------------------
2019-12-07 23:04:26 | 2019-12-07 23:04:26 | 2019-12-07 23:04:26 | 2019-12-07 23:04:26