SQL Server Dynamic data masking is available in four
different formats based on the data types.
Default- Fully masked data as per the data types of the
selected fields.
ALTER COLUMN City ADD MASKED WITH (FUNCTION = 'default()')
Email – Using this method we can apply masking on the email
data of the users.
ALTER COLUMN Email ADD MASKED WITH (FUNCTION = 'email()')
Custom String – As per the name, this method can be used to
mask the starting characters and last characters as per the custom requirement.
ALTER COLUMN [Mobile Number] ADD MASKED WITH (FUNCTION =
'partial(1,"XXXXXXX",0)')
Random – This function is used to replace number columns
with random values.
ALTER COLUMN [OrdrerNO] ADD MASKED WITH (FUNCTION =
'random(1, 5)')
No comments:
Post a Comment