Give an example of REPLICATE function.

 Posted by vishalneeraj-24503 on 11/25/2014 | Category: Sql Server Interview questions | Views: 309 | Points: 40
Answer:

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


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response