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 |
You have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation?
How do I perform an unattended install of sql server 2000?
How to get a list of columns using the "sys.columns" view in ms sql server?
What is difference between global temporary tables and local temporary tables?
What is the sql server 2000 version number?
what is the basic diffrence betn a col declared in char(1) and in varchar(1)
How to write an inner join with the where clause in ms sql server?
How to find the list of fixed hard drive and free space on server?
What are the differences between “row_number()”, “rank()” and “dense_rank()”?
Can sql servers linked to other servers?
Can we rollback records deleted by a truncate statement?
3 Answers CarrizalSoft Technologies, United Healthcare,
Explain the xml support sql server extends?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)