Fungsi SQL Server REPLICATE()
Contoh
Ulangi string:
SELECT REPLICATE('SQL Tutorial', 5);
Definisi dan Penggunaan
Fungsi REPLICATE() mengulang string beberapa kali.
Sintaksis
REPLICATE(string, integer)
Nilai Parameter
Parameter | Description |
---|---|
string | Required. The string to repeat |
integer | Required. The number of times to repeat the string |
Detail Teknis
Bekerja di: | SQL Server (dimulai dengan 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse |
---|
Lebih Banyak Contoh
Contoh
Ulangi teks di CustomerName dua kali:
SELECT REPLICATE(CustomerName, 2)
FROM Customers;