CURRENT_ROW_TIMESTAMP

CURRENT_ROW_TIMESTAMP 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.

0: jdbc:sqlstream:> values(current_row_timestamp);
+-----------------------+
| CURRENT_ROW_TIMESTAMP |
+-----------------------+
| 2020-12-12 15:26:49.548 |
+-----------------------+

CURRENT_ROW_TIMESTAMP is similar to CURRENT_TIMESTAMP, but it returns the actual timestamp as each row is processed. That’s unlike CURRENT_TIMESTAMP which (as required by the SQL standard, and like the other date / time functions) is evaluated once as the query starts and uses the same result for every row.

For a streaming query it is much more common to use CURRENT_ROW_TIMESTAMP rather than any of the other date / time functions.

CURRENT_ROW_TIMESTAMP is a SQLstream extension to the SQL standard.

See also: