REPLICATE is used if you wish to replicate the same string several times. : REPLICATE « String Functions « SQL Server / T-SQL Tutorial






4> SELECT REPLICATE("www.java2s.com! ",5)
5>
6>

--------------------------------------------------------------------------------
www.java2s.com! www.java2s.com! www.java2s.com! www.java2s.com! www.java2s.com!

(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