TRANSACTION_DATE() SQL Function

Previous Next

See Also

You can use TRANSACTION_DATE() to refer to the current server date and time of the first time this function is processed within the transaction.

If TRANSACTION_DATE() is used repeatedly within the same transaction, each instance represents the same date and time.

TRANSACTION_DATE() is queried on the server only once within the transaction. If called again within the transaction, it is handled locally.

TRANSACTION_DATE() requires no parameters:

UPDATE tab1

SET date1 = TRANSACTION_DATE()

WHERE <primary_key> = <value>

NOTE:

With SYSDATE, identical date and time within the same transaction is not guaranteed. If a statement containing SYSDATE is sent to the server because it cannot be solved locally, then the current server date and time is retrieved even if SYSDATE has already been called earlier within the transaction.