The STUFF()
function inserts a string into another string by first deleting a specified number of characters. The following example, deletes "Svr" and replaces it with "Server". This happens by specifying the start_position
and length
of the replacement.
SELECT STUFF('SQL Svr Documentation', 5, 3, 'Server')
Executing this example will result in returning SQL Server Documentation
instead of SQL Svr Documentation.