وظيفة SQL Server REPLICATE ()
مثال
كرر سلسلة:
SELECT REPLICATE('SQL Tutorial', 5);
التعريف والاستخدام
تكرر الدالة REPLICATE () سلسلة عدد محدد من المرات.
بناء الجملة
REPLICATE(string, integer)
قيمه المعامل
Parameter | Description |
---|---|
string | Required. The string to repeat |
integer | Required. The number of times to repeat the string |
تفاصيل تقنية
يعمل في: | SQL Server (بدءًا من 2008) ، قاعدة بيانات Azure SQL ، مستودع بيانات Azure SQL ، مستودع البيانات المتوازي |
---|
مزيد من الأمثلة
مثال
كرر النص في CustomerName مرتين:
SELECT REPLICATE(CustomerName, 2)
FROM Customers;