SQL_CURRENT_DATE
SQL - Functions
SQL_CURRENT_DATE
Returns the current date
1998-04-15
CURRENT_DATE
1998-04-15
Inputs
None
1998-04-15
Outputs
Returns "today"
1998-04-15
Description
The niladic CURRENT_DATE function has a data type of
DATE and returns the date at the time that it is run.
1998-04-15
Notes
Refer to SET DATESTYLE for further information about date format.
Usage
Insert the date of insertion into a row:
INSERT INTO films
VALUES ('TM999','Ben Hur',105,CURRENT_DATE,'Action',NULL);
Display CURRENT-DATE:
SELECT CURRENT_DATE AS today;
today
------------
1998-03-31
Compatibility
1998-04-15
SQL92
Full compatibility.