CURRENT_DATE
CURRENT_DATE is a built-in function in SQL. It returns the current date according to the system date of the computer executing the SQL query. The date is displayed in 'YYYY-MM-DD' format. The function does not require any parameters.
CURRENT_DATE()
Example
Output
Explanation
The CURRENT_DATE()
function has been used in the SQL query. When executed, it returns the current date. The output shows the date of execution in ‘YYYY-MM-DD’ format.
CURRENT_DATE()
Example
Output
Explanation
The CURRENT_DATE
function in PostgreSQL returns the current date. This date is determined by the system clock. The example code runs this function and outputs the current date.
CURRENT_DATE()
Example
Output
Explanation
The CURRENT_TIMESTAMP
function returns the current date and time in SQL Server. The returned value includes the date and time to the millisecond.
CURRENT_DATE()
Example
Output
Explanation
The CURRENT_DATE
function in Oracle returns the current date from the system. The date is returned as a DATE
datatype value with the format ‘DD-MON-YY’. The query above simply fetches and displays the current date from the system. The ‘dual’ is a special one-row table present by default in Oracle database.
CURRENT_DATE();
Example
Output
Explanation
In the above code snippet, the SQL function “CURRENT_DATE” is used to fetch the current date from the system. Be aware that the date returned by the CURRENT_DATE function will depend on the system date where the database is running.