SQL Server › Dynamic Data Masking
What is dynamic data masking in SQL Server, and what problem does it solve?
BeginnerAnswer
Dynamic data masking automatically hides sensitive information, like a full credit card number or an email address, from users who query a table but do not have special permission to see the unmasked value, without actually changing the real data stored in the database, protecting sensitive information from being casually viewed by everyone with query access.
ALTER TABLE Customers
ALTER COLUMN Email ADD MASKED WITH (FUNCTION = 'email()');Real-world example A customer support team can look up customer records to help with orders, but sees a masked version of each customer's email address instead of the real value, protecting customer privacy while still letting them do their job.