Deletes a specified length of characters and inserts another set of characters at a specified starting point.
STUFF(character_expression, start, length, character_expression)
Returns character data if character_expression is one of the supported character data types. Returns binary data if character_expression is one of the supported binary data types.
String functions can be nested.
This example returns a character string created by deleting three characters from the first string (abcdef) starting at position 2 (at b) and inserting the second string at the deletion point.
SELECT STUFF('abcdef', 2, 3, 'ijklmn')
GO
Here is the result set:
---------
aijklmnef
(1 row(s) affected)
Data Types | String Functions |