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
What is the difference between lock, block and deadlock? : sql server database administration
what are different types of raid configurations? : Sql server database administration
What is the recursive stored procedure in sql server?
What are the differences between local and global temporary tables?
Explain the difference between control flow and data flow?
mention different types of relationships in the dbms?
How can you check the version of sql server?
What is triggers and stored procedures?
how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration
what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?
hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.
How to remove duplicate rows from table?
Write a Select Query to display title for each group of records, which are collected with Compute Clause? Like titlefield column-A column-B ..... ..... ..... Sum ... titlefield column-A column-B ..... ..... ..... Sum ...
How to restore performance issues and how to check?
How to make a column nullable?