Back to results for “Security”
SQL Server › Dynamic Data Masking

What is dynamic data masking in SQL Server, and what problem does it solve?

Beginner

Answer

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.

Common follow-ups: Does dynamic data masking actually encrypt the underlying data?;Who is able to see the real, unmasked values?