Skip to main content

REPEAT

Returns a string repeated a specified number of times.

Syntax​

REPEAT ( string_expression, number_of_repetitions ) 

Arguments​

string_expression
A valid string expression.

number_of_repetitions The number of times to repeat the string specified as a numeric.

Return Type​

Returns a STRING.

Examples​

Examples in this section use the example blockchain.

The following example repeats each value in str twice.

SELECT REPEAT(str, 2) FROM example;

Response:

SELECT REPEAT(str, 2) [STRING]
NULL
dd
leclect
dialectdialect