Value functions
A value function is a niladic function (that is, a function that has no arguments) that returns information about the system. You can use a value function wherever you can use a constant.
The following table lists and describes each value functions
and whether its name is a reserved or non-reserved keyword. For more
information about reserved and non-reserved keywords, see SQL common reserved words.
Function | Description | Netezza® SQL | SQL-92 |
---|---|---|---|
current_date |
The current system date. | Reserved | Reserved |
current_time |
The current system time, to the nearest full second. | Reserved | Reserved |
current_time(p) |
The current system time. The variable p represents
a value in the range 0-6, and determines the number of decimal places
for the seconds. |
Reserved | Reserved |
current_timestamp |
The current system date and time, to the nearest full second. | Reserved | Reserved |
current_timestamp(p) |
The current system date and time. The variable p represents
a value in the range 0-6, and determines the number of decimal places
for the seconds. |
Reserved | Reserved |
current_catalog |
The current catalog. | Reserved | Reserved |
current_user |
The current user. | Reserved | Reserved |
session_user |
The session user. | Reserved | Reserved |
current_db |
The name of the current database. | Reserved | Non-reserved |
current_userid |
The user ID of the current user. | Reserved | Non-reserved |
current_useroid |
The object ID of the current user. | Reserved | Non-reserved |
now() |
The current system date and time, to the nearest full second. |