Replicate function in Sql Server
Replicate fucntion in Sql server repeats a string for a number of times specified by the user.
Syntax:
REPLICATE ( string_expression ,integer_expression )
Here string_expression is the string you want to repeat for multiple times and integer_expression is the number of times you want string to be repeated.
Lets take an example and discusss.
If you want to repeat 'A' five times then just use replication function REPLICATE('A',5). It will produce 'AAAAA' as an output.
SELECT REPLICATE('A',5)
SELECT REPLICATE('India-',5)
OutPut
-------
AAAAA
India-India-India-India-India-
Hope it will help. Happy reading