REPLICATE#

Repeats a string value a specified number of times.

Syntax#

REPLICATE ( string_expression, integer_expression )

Arguments#

string_expression

Is an expression of a character string or binary data type. string_expression can be a constant, variable, or column either character or binary data.

index

Is an expression of any integer type, including bigint. If index is negative, NULL is returned.

Return types#

Returns the same type as string_expression.

Examples#

SELECT REPLICATE('no more sweets ', 3);

See Also#