SET CURRENT TEMPORAL SYSTEM_TIME
The SET CURRENT TEMPORAL SYSTEM_TIME statement changes the value of the CURRENT TEMPORAL SYSTEM_TIME special register.
Invocation
This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.
Authorization
None required.
Syntax
Description
- NULL
- Specifies the null value.
- expression
- An expression that can be assigned to a TIMESTAMP(12). The expression must not contain a scalar fullselect or a function that is non-deterministic, external action, or modifies SQL data.
Notes
Transaction considerations: The SET CURRENT TEMPORAL SYSTEM_TIME statement is not a committable operation. ROLLBACK has no effect on CURRENT TEMPORAL SYSTEM_TIME.
CURRENT TEMPORAL SYSTEM_TIME scope: The scope of the CURRENT TEMPORAL SYSTEM_TIME special register is the activation group and connection.
Examples
Example 1: Set the CURRENT TEMPORAL SYSTEM_TIME special register to the previous month.
SET CURRENT TEMPORAL SYSTEM_TIME = CURRENT TIMESTAMP - 1 MONTH
Example 2: Set the CURRENT TEMPORAL SYSTEM_TIME special register to the null value.
SET CURRENT TEMPORAL SYSTEM_TIME = NULL