In SQL Server, you can use the T-SQL STUFF() function to insert a string into another string. This enables you to do things like insert a word at a specific position. It also allows you to replace a word at a specific position.
Here’s the official syntax:
STUFF ( character_expression , start , length , replaceWith_expression )
character_expressionis the original string. This can actually be a constant, variable, or column of either character or binary data.startspecifies the start position (i.e. where the new string will be inserted).lengthis how many characters are to be deleted from the original string.replaceWith_expressionis the string that’s being inserted.replaceWith_expressioncan be a constant, variable, or column of either character or binary data.