SQL_CURRENT_DATE

Name

SQL_CURRENT_DATE — - returns the current date, (i.e "today").
   CURRENT_DATE
  

Inputs

None

Outputs

Returns "today"

Description

The niladic CURRENT_DATE function has a data type of DATE and returns the date at the time that it is run.

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

SQL92

Full compatibility.