CURRENT TIMESTAMP
The CURRENT TIMESTAMP special register specifies a timestamp that is based on a reading of the time-of-day clock when the SQL statement is executed at the current server.
If this special register is used more than one time within a single SQL statement, or used with CURRENT DATE or CURRENT TIME within a single statement, all values are based on a single clock reading.1
The value of CURRENT TIMESTAMP in a user-defined function or stored procedure is inherited according to the rules in Table 1.
Specifying CURRENT_TIMESTAMP is equivalent to specifying CURRENT TIMESTAMP.
If you want a timestamp with a specified precision, the special register can be referenced as CURRENT TIMESTAMP(integer), where integer can range from 0 to 12. The default precision is 6. SYSDATE can also be specified as a synonym for CURRENT TIMESTAMP(0).
If you want a timestamp with a time zone, the special register can be referenced as CURRENT TIMESTAMP (integer) WITH TIME ZONE, or CURRENT TIMESTAMP WITH TIME ZONE. SYSTIMESTAMP can be specified as an alternative to CURRENT TIMESTAMP(12) WITH TIME ZONE. The time zone is determined from the CURRENT TIME ZONE special register.
SELECT * FROM SYSIBM.SYSCOPY
WHERE TIMESTAMP > CURRENT TIMESTAMP - 7 DAYS;
INSERT INTO IN_TRAY
VALUES (CURRENT TIMESTAMP, :SRC, :SUB, :TXT)
SELECT CURRENT TIMESTAMP(8) WITH TIME ZONE
FROM SYSIBM.SYSDUMMY1;