How to masked the email ID column for make the securable Emails in table in SQL Server?
How to masked the email ID column for make the securable Emails in table in SQL Server?
Web Developer
I am a professional .NET developer with over 4 years of hands-on industry experience in designing, developing, and maintaining scalable web applications. I specialize in .NET Core, C#, RESTful APIs, and database-driven systems using SQL Server.
To mask an email ID in SQL Server, one can use the
STUFFfunction to remove some characters, put*on the result set, and put back some characters at the end.Example Query:
Explanation:
CHARINDEX('@', Email): Finds the position of the@symbol in the email.STUFF: Replaces the characters starting 3 characters before the@with***.Hope it helps!!