CURRENT_ROW_TIMESTAMP

<< Click to Display Table of Contents >>

Navigation:  Streaming SQL Reference Guide > Basic Building Blocks > Functions > Scalar Functions > Time Functions >

CURRENT_ROW_TIMESTAMP

Previous pageReturn to chapter overviewNext page

CURRENT_ROW_TIMESTAMP is a SQLstream extension to the SQL:2008 specification. This function returns the current timestamp as defined by the computer on which the s-Server is running. CURRENT_ROW_TIMESTAMP is always returned as UTC, not the local timezone.

CURRENT_ROW_TIMESTAMP is similar to LOCALTIMESTAMP, but returns a new timestamp for each row in a stream.

A query run with LOCALTIMESTAMP (or CURRENT_TIMESTAMP or CURRENT_TIME) as one of the columns puts into all output rows the time the query is first run.

If that column instead contains CURRENT_ROW_TIMESTAMP, each output row gets a newly-calculated value of TIME representing when that row was output.

Note

CURRENT_ROW_TIMESTAMP is not defined in the SQL:2008 specification; it is a SQLstream extension.

See also CURRENT_TIME, CURRENT_DATE, CURRENT_TIMESTAMP, LOCALTIMESTAMP, LOCALTIME, CURRENT_ROW_TIMESTAMP.