The REPLICATE() function repeats a string a specified number of times.
REPLICATE(
string, integer)
Parameter | Description |
---|---|
string | Required. The string to repeat |
integer | Required. The number of times to repeat the string |
Works in: | SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|
Repeat the text in CustomerName two times:
SELECT REPLICATE(CustomerName, 2)
FROM Customers;
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!