What is the STUFF function and how does it differ from the
REPLACE function?
Answer Posted / 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 |
Post New Answer View All Answers
How to handle error or exception in sql?
What do you understand by physical_only option in dbcc checkdb?
Can you index views?
how can you attach more than 20 ldf files in sql server
explain how to create a new schema in a database? : Sql server database administration
What are the 3 types of schema?
What is a view in sql?
How to list all columns in a table using odbc_columns()?
Explain what is cte (common table expression)?
What is a virtual table in sql?
What are the types of containers in ssis?
What do you mean by the term 'normalization'?
What is pessimistic concurrency?
What is a DBMS, query, SQL?
What is sql view?