Answer: REPLACE function is used to replace all the occurrences of the given pattern in a string.
Example: select Replace('vishal','l','n');
Output is nishal
STUFF function is used to replace the part of string with some other string.
Syntax: Stuff(expression,start_pos,length,replacementcharacters);
Example:
Select Stuff('vishal',1,2,'ku');
Output is kushal
Asked In: Many Interviews |
Alert Moderator