SQL_CURRENT_TIME

Name

SQL_CURRENT_TIME — - returns the current local time, (i.e "now").
   CURRENT_TIME 
  

Inputs

None

Outputs

Returns "now"

Description

The niladic CURRENT_TIME function has a data type of TIME and returns the local time when it is run.

Notes

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

Usage

Display CURRENT_TIME:

   SELECT CURRENT_TIME AS now;

   now
   -----------
   17:41:31+02

  

Compatibility

SQL92

SQL92 specifies some additional capabilities for CURRENT_TIME:

CURRENT_TIME [ (scale) ]

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