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
How do I find the sql server instance name?
Is truncate a dml command?
What are the components of dbms?
What is query parameter in ssrs?
What the different components of Replication and what is their use?
Differentiate between delete and truncate.
How to write a query with a right outer join in ms sql server?
What is scan table/view and seek table/view when its occurs? : sql server database administration
what are user defined datatypes? : Sql server database administration
What are relationships and mention different types of relationships in the dbms
How retrieve field names from the table in SQL through JAVA code?
hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail
Data table as parameter in sql server?
What are the differences between user defined functions and stored procedures?
What is usually the first word in a sql query?