ROWID

Click to skip syntax diagram
Read syntax diagramSkip visual syntax diagram>>-ROWID--(--string-expression--)------------------------------><
 

The ROWID function casts a character string to a row ID.

string-expression
An expression that returns a character string value. Although the string can contain any value, it is recommended that it contain a ROWID value that was previously generated by DB2 UDB for z/OS or DB2 UDB for iSeries to ensure a valid ROWID value is returned. For example, the function can be used to convert a ROWID value that was cast to a CHAR value back to a ROWID value.

If the actual length of string-expression is less than 40, the result is not padded. If the actual length of string-expression is greater than 40, the result is truncated. If non-blank characters are truncated, a warning is returned.

The length attribute of the result is 40. The actual length of the result is the length of string-expression.

The result of the function is a row ID. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

Note

Syntax alternatives: The CAST specification should be used for maximal portability. For more information, see CAST specification.

Example