Repeating any characters or string values using Replicate function.

vishalneeraj-24503
Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 288
Suppose,we want to repeat ant character or string 4 times,then we will write as:-
SELECT REPLICATE('vishal ',4) as Repeated_String;

Output:-
vishal vishal vishal vishal


Below query will return repeated number 5 times.
SELECT REPLICATE('5',5) as Repeated_Number;

Output:-
55555

Comments or Responses

Login to post response