SQL/MX 2.x Reference Manual (G06.24+, H06.03+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual523725-004
9-40
CURRENT_TIMESTAMP Function
CURRENT_TIMESTAMP Function
The CURRENT_TIMESTAMP function returns a value of type TIMESTAMP based on
the current local date and time. You can also use the CURRENT Function on
page 9-37.
precision
is an integer value in the range 0 to 6 that specifies the precision of (the number of
decimal places in) the fractional seconds in the returned value. The default is 6.
For example, the function CURRENT_TIMESTAMP (2) returns the current date
and time as a value of data type TIMESTAMP, where the precision of the fractional
seconds is 2; for example, 1997-06-26 09:01:20.89. The value returned is not a
string value.
Examples of CURRENT_TIMESTAMP
The PROJECT table contains a column SHIP_TIMESTAMP of data type
TIMESTAMP. Update a row by using the CURRENT_TIMESTAMP value:
UPDATE persnl.project
SET ship_timestamp = CURRENT_TIMESTAMP
WHERE projcode = 1000;
CURRENT_TIMESTAMP [(precision)]