Returns a string consisting of the specified expression repeated a given number of times.
replicate(char_expr | uchar_expr, integer_expr)
is a character-type column name, variable, or constant expression of char, varchar, nchar, or nvarchar type.
is a character-type column name, variable, or constant expression of unichar or univarchar type.
is any integer (tinyint, smallint, or int) column name, variable, or constant expression.
select replicate("abcd", 3)
------------ abcdabcdabcd
replicate, a string function, returns a string with the same datatype as char_expr or uchar_expr containing the same expression repeated the specified number of times or as many times as fits into 16K, whichever is less.
If char_expr or uchar_expr is NULL, returns a single NULL.
For general information about string functions, see “String functions”.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute replicate.
Function stuff