Entering content frame

NEXT STAMP statement 

The NEXT STAMP statement supplies a unique key that was generated by the database system.

Syntax

<next_stamp_statement> ::= NEXT STAMP [INTO] <parameter_name>

parameter_name

Explanation

The database system is able to generate unique values. This is a serial number that starts with X'0000000000001'. The values are assigned in ascending order. It cannot be ensured that a sequence of values is uninterrupted. These values can be stored in a column with the data type CHAR(n) BYTE with n>=8.

The NEXT STAMP statement assigns the next key generated by the database system to the variable denoted by parameter name.

The NEXT STAMP statement can only be embedded in a programming language and cannot be used in interactive mode.

The keyword STAMP can be also used in an INSERT statement or an UPDATE statement if the next value is to be generated by the database system and stored in a column without the user knowing the value.

 

 

Leaving content frame