REPEAT

Replicates a string the specified number of times, and concatenates the replicated values as a single string. The return value can be up to 65000 bytes in length. If the length of stringcount is greater than 65000 bytes, Vertica silently truncates the results.

Behavior Type

Immutable

Syntax

REPEAT ( 'string', count )

Parameters

string

The string to repeat, one of the following: CHAR, VARCHAR, BINARY or VARBINARY.

count

An integer expression that specifies how many times to repeat string.

Examples

The following example repeats vmart three times:

=> SELECT REPEAT ('vmart', 3);
     REPEAT
-----------------
 vmartvmartvmart
(1 row)