COPIES function - returns concatenated VARBINARY value N times

The COPIES function returns the concatenated results of the VARBINARY value, repeated N times.

Syntax

Read syntax diagramSkip visual syntax diagramUTL_RAW.COPIES(input1, input2)

Parameters

input1
An input argument of type VARBINARY(32672) that specifies the value to be copied.
input2
An input argument of type INTEGER that specifies the number of copies of Input1 to make.

Authorization

EXECUTE privilege on the UTL_RAW module.

Example

Example 1: The following example copies the VARBINARY value two (2) times:
db2 "select sysibmadm.utl_raw.copies(bx’0101’, 2) from sample "

1          
-----------
          X’01010101’

  1 record(s) selected.