Current Function; Example Of Current - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

CURRENT Function

The CURRENT function returns a value of type TIMESTAMP based on the current local date
and time. You can also use
CURRENT [(precision)]
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.

Example 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;
312
SQL Functions and Expressions
"CURRENT_TIMESTAMP Function" (page
316).

Advertisement

Table of Contents
loading

Table of Contents