What is the STUFF function and how does it differ from the
REPLACE function?
Answers were Sorted based on User's Feedback
Answer / abhaymalviya
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 ? | 37 Yes | 1 No |
Answer / 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 |
What is hot add cpu in sql server 2008?
What is apply operator in sql?
What is row-level compre?
What is meant by Active-Passive and Active-Active clustering setup?
Issues related in upgrading SQL Server 2000 to 2005 / 2008
What is the dbcc command and why is it used?
What are the steps you will take to improve performance of a poor performing query?
Can a table be created inside a trigger?
How to verify the port number of the sql server?
Tell me what is the significance of null value and why should we avoid permitting null values?
Why do we backup Active Directory ?
What are the types of resultset?