SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual540440-003
9-34
CURRENT Function
CURRENT Function
The CURRENT function returns a value of type TIMESTAMP based on the current
local date and time. You can also use CURRENT_TIMESTAMP 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 (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
The PROJECT table contains a column SHIP_TIMESTAMP of data type
TIMESTAMP. Update a row by using the CURRENT value:
UPDATE persnl.project
SET ship_timestamp = CURRENT
WHERE projcode = 1000;
CURRENT [(precision)]