CURTIME()/CURRENT_TIME/CURRENT_TIME()/SYS_TIME/SYSTIME

Description

The CURTIME(), CURRENT_TIME, CURRENT_TIME(), SYS_TIME, and SYSTIME are used interchangeably, and they return the current time as TIME type (HH:MI:SS). The unit is second.

Syntax

CURTIME()

CURRENT_TIME

CURRENT_TIME()

SYS_TIME

SYSTIME

Example

--it returns the current time in TIME type

SELECT CURTIME(), CURRENT_TIME(), CURRENT_TIME, SYS_TIME, SYSTIME;

   SYS_TIME     SYS_TIME     SYS_TIME     SYS_TIME     SYS_TIME

=================================================================

  04:37:34 PM  04:37:34 PM  04:37:34 PM  04:37:34 PM  04:37:34 PM

 

--it returns the time value 1 hour added to the current sys_time

SELECT CURTIME()+3600;

   SYS_TIME +3600

=================

   05:37:34 PM