SQL Server Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 297 Page Views: 

What is the function of STUFF in SQL Server?



Posted By: Avi Date: 1 October 2010 12:11:08 PM
 Answer:

STUFF function inserts one string into the other. Basically it deletes the specified length of the first string and from the point mentioned as start of the second string. Then it add the second string to that specific position. Syntax:- STUFF (string1 , start , length ,string2 ) Example:- SELECT STUFF('Hello Smith', 3, 3, 'y'); GO Result of the above transaction is:- Hey Smith


Posted By: avibtech


Date: 1 October 2010 12:11:08 PM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image SJGmcb
Related Questions
SQL Server : Is SET and SELECT the same thing?

Is SET and SELECT the same thing?

No. Both are used to assign value to the variables, but are different. SET uses ANSI standard while ....
Category: SQL Server Date: 10/1/2010 11:05:06 AM
SQL Server : If database is already opened and work is being done on it , is it possible to rename the database at that time?

If database is already opened and work is being done on it , is it possible to rename the database a....

No, if someone is using the databse then the datbase can't be renamed . For renaming the database we....
Category: SQL Server Date: 10/1/2010 11:04:06 AM
SQL Server : How the database can be renamed?

How the database can be renamed?

sp_rename 'olddatabasename' 'newdatbasename'
Category: SQL Server Date: 10/1/2010 11:03:06 AM
SQL Server : Having a table which is refrenced by Foreign Key. Can the TRUNCATE command be executed on that table?

Having a table which is refrenced by Foreign Key. Can the TRUNCATE command be executed on that table....

No,it is not possible . Because according to refrential integrity the table with the foreign can not....
Category: SQL Server Date: 10/1/2010 11:02:06 AM
SQL Server : Which command is used to display the current distribution statistics ?

Which command is used to display the current distribution statistics ?

DBCC SHOW_STATISTICS is the command used for displaying the current distribution statistics. Synatx:....
Category: SQL Server Date: 10/1/2010 11:01:06 AM