SQL_CURRENT_TIMESTAMP

Name

SQL_CURRENT_TIMESTAMP — returns the current timestamp, (i.e the date "today" concatenated with time "now").
  CURRENT_TIMESTAMP 
 

Inputs

None

Outputs

Returns "today" and "now".

Description

The niladic CURRENT_TIMESTAMP function has a data type of TIMESTAMP and returns the date and local time at which it is run.

Notes

Refer to the SET TIME ZONE statement for a further description of local time.

Usage

Display CURRENT_TIMESTAMP:

   SELECT CURRENT_TIMESTAMP AS date_and_time;

   date_and_time
   ----------------------
   1998-03-31 07:41:21-08
  

Compatibility

SQL92

SQL92 specifies some additional capabilities for CURRENT_TIMESTAMP:

CURRENT_TIMESTAMP [ (scale) ]

The optional scale for CURRENT_TIMESTAMP, if specified, is an unsigned integer representing the number of digits in the optional seconds fraction of the time value represented by the function.