What is the STUFF function and how does it differ from the
REPLACE function?
Answer Posted / ruchi
STUFF - Delete a specified length of characters and insert
another set of characters at a specified starting point.
For example: SELECT STUFF('asdfghjkl', 3, 5, 'XYZ')
Go
here the result set is:
asXYZkl
REPLACE - Replace all occurrences of the second given string
expression in the first string expression with a third
expression.
For Example: SELECT REPLACE('Abhay', 'a', 'KKT')
Here the result set is:
KKTbhKKTy
| Is This Answer Correct ? | 9 Yes | 6 No |
Post New Answer View All Answers
What does normalization do to data?
How you trouble shoot when any job fails
How many joins in sql server?
Explain in details security in SQL azure?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
Explain syntax for viewing, dropping and disabling triggers?
What are rest-style architecture's?
What is checkpoint in sql server?
let's assume you have data that resides on sql server 6.5. You have to move it sql server 7.0. How are you going to do it? : Sql server database administration
Find first and last day of current month in sql server
What is extent? Types of extents?
How do I find sql server instance name?
What is the difference between functions and stored procedures?
What is snapshot parameter in ssrs?
How to create a dml trigger using create trigger statements?