Sql server STUFF function

In this article I am going to explain Sql server stuff function.


Description:
STUFF function is used to append number of characters from one string and replace them with another string. Simply you can say this function insert string into another string, it will remove all the specified length of string.

 Syntax
STUFF(string,start,length,add_string) 

Example:
SELECT STUFF('articlemirror.in',15,2, 'com') as [stuff eg]

SELECT STUFF('www.articlemirror.in',1, 0, 'http://')  as [stuff eg]

Output:

Sql server STUFF function




Post a Comment

0 Comments