Repeating an Expression N Number of Times : REPLICATE « String Functions « SQL Server / T-SQL Tutorial






4>
5> SELECT REPLICATE ('Z', 30)
6> GO

------------------------------
ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

(1 rows affected)








12.14.REPLICATE
12.14.1.Repeating an Expression N Number of Times
12.14.2.REPLICATE is used if you wish to replicate the same string several times.
12.14.3.REPLICATE('A', 3)
12.14.4.select REPLACE(RIGHT('(559) 555-1212', 13), ') ', '-')
12.14.5.The REPLICATE() and LEN() Functions