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 are Row versions of DataRow?
On a windows server 2003 active – passive failover cluster, how do you find the node which is active?
What happens when converting big values to numeric data types?
Difference between drill down and drill through report.
how many types of store procedre in sqlserver 2000?
two tables with table name ship(name,year) and battle (name,year),how to find the latest added year in the table ship
How do I find the size of a sql server database?
Explain what is lock escalation?
Mention the uses of stored procedures.
What do you understand by a view? What does the with check option clause for a view do?
What are the differences between substr and charindex in sql server.
What are the difference between “where” and “having” clause in sql server?