This topic contains and tries to cover following subjects
- Explanation of STUFF () function in SQL
- Syntax of STUFF () function in SQL
- Example to STUFF () function in SQL
Articles contains and tries to provide answer to following questions and issues:
- What is STUFF () function..
- How to use STUFF () function..
- How to insert a string into another string in Table
- How to replace a string with deleting a specified string in Table
Articles may require following knowledge:
- Basic query flow in SQL
- SQL Server Management Studio
- SQL Server string functions
Explanation of STUFF () function in SQL
STUFF function is used to replace a string data in table of SQL with another string . We provide the start position of string which indicates where to start replacement-delete, length which indicates how many char acter to be replaced-deleted, and final parameter is the string to be put.
Syntax of STUFF () function in SQL
Syntax for stuff function is as follows:
STUFF (source string , start , length , target string )
Example of STUFF () function in SQL
Following example demonstrates how to use stuff function to replace a text with another with SELECT query.