STUFF(Original_Expression, Start, Length, Replacement_expression)
STUFF() function inserts Replacement_expression, at the start position specified, along with removing the characters specified using Length parameter.
Select FirstName, LastName,Email, STUFF(Email, 2, 3, '*****') as StuffedEmail From Employee
Executing this example will result in returning the given table
FirstName | LastName | StuffedEmail | |
---|---|---|---|
Jomes | Hunter | [email protected] | J*****[email protected] |
Shyam | rathod | [email protected] | S*****[email protected] |
Ram | shinde | [email protected] | R*****hotmail.com |