Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site

http://developer.mimer.com


Datetime Pseudo-Literals


The following sections document datetime pseudo-literals.

CURRENT_DATE

Returns a DATE value denoting the current date (i.e. today).

Syntax

Syntax for the CURRENT_DATE function:

Rules

Example

 SET D = CURRENT_DATE;

LOCALTIME

Returns a TIME value denoting the current time (i.e. now).

Syntax

Syntax for the LOCALTIME function:

seconds-precision is an unsigned integer value denoting the seconds precision for the returned TIME value.

Rules

LOCALTIMESTAMP

Returns a TIMESTAMP denoting the current date and time.

Syntax

Syntax for the LOCALTIMESTAMP function:

seconds-precision is an unsigned integer value denoting the seconds precision for the returned TIME value.

Rules

Example

 CREATE TABLE EVENTS(ID  INTEGER    PRIMARY KEY,
                     TS  TIMESTAMP  DEFAULT LOCALTIMESTAMP);
 INSERT INTO EVENTS(ID) VALUES (1);  -- default value for TS inserted 
                                     -- (e.g. 2002-01-18 11:25:07.230000)
 UPDATE EVENTS
 SET    TS = LOCALTIMESTAMP
 WHERE  ID <= 10;


Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL Documentation TOC PREV NEXT INDEX