DB2 10.5 for Linux, UNIX, and Windows

SET CURRENT REFRESH AGE statement

The SET CURRENT REFRESH AGE statement changes the value of the CURRENT REFRESH AGE special register.

This statement is not under transaction control.

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

Read syntax diagramSkip visual syntax diagram
                             .-=-.                         
>>-SET--CURRENT REFRESH AGE--+---+--+-numeric-constant-+-------><
                                    +-ANY--------------+   
                                    '-host-variable----'   

Description

numeric-constant
A DECIMAL(20,6) value that represents a time stamp duration.The value must be 0 - 99999999999999 or a valid time stamp within that range. The valid format for the range is yyyymmddhhmmss.nnnnnn, where:
  • yyyy is the number of years and can have a value of 0 - 9999.
  • mm is the number of months and can have a value of 0 - 11.
  • dd is the number of days and can have a value of 0 - 30.
  • hh is the number of hours and can have a value of 0 - 23.
  • mm is the number of minutes and can have a value of 0 - 59.
  • ss is the number of seconds and can have a value of 0 - 59.
  • nnnnnn is the number of fractional seconds. The fractional seconds portion of the value is ignored and therefore can be any value.
You do not have to include the leading zeros for the entire value or the trailing fractional seconds. However, individual elements that have another element to the left must include the zeros. For example, to represent 1 hour, 7 minutes, and 5 seconds, use 10705.

If materialized query tables that are affected by the CURRENT REFRESH AGE special register are maintained by USER, SYSTEM, or FEDERATED_TOOL, the only valid numeric values are 0 and 99999999999999. For further details, see the "Notes" section.

ANY
A short form 99999999999999. See the description of the numeric-constant parameter.
host-variable
A variable of type DECIMAL(20,6) or another type that is assignable to DECIMAL(20,6). You cannot set the host-variable parameter to null. If the host variable has an associated indicator variable, the value of that indicator variable must not indicate a null value (SQLSTATE 42815). The host-variable parameter must conform to the same constraints as the numeric-constant parameter.

Notes

Examples