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 |
How to write a query with an inner join in ms sql server?
Do you know what is a trace frag? Where do we use it?
can an order by clause be used in a creation of a view?
Why truncate is ddl?
What are the steps to process a single select statement?
What is repeatable read?
i need some interview questions on sql server developer plz any onee send some links.
How to Handle the exceptions in Sqlsrver 2005??
How do I find information about the install locations for the various instances running on a computer?
How to encrypt data between dialogs?
What is table valued function and scalar valued functions?
How to create a simple user defined function in ms sql server?