Answer: Stuff function is also a String function which works exactly same as Replace function except for searching any value from specified string.It replaces portion of the string in a specified string.
Syntax:
Stuff(expression_value1,start_position,string_length,expression_value2);
Where:
expression_value1: Is our any string a string from which portion of characters will be replaced.It can be a constant,variable,or column of either character or binary data.
string_length: Is a Numeric value that specifies starting index to replace characters from expression_value1.If we specify negative value or greater than the expression_value1 string then Stuff function returns null value.
string_length: Is also a Numeric Value which specifies number of characters to be replaced from expression_value1.If negative value is specified as length,then stuff function returns null value.
expression_value2: Is a new string to be changed from expression_value1.
Asked In: Many Interviews |
Alert Moderator