Masking entire table in one line of script - DDM

Copper Contributor

Hi all,

is there a way in Dynamic Data Masking (DDM) to mask an entire table with just one line of script using the same function for all columns? defining the masking rule on the table as a whole?

something like: ALTER TableName ADD MASKED WITH (FUNCTION =  'default()')

4 Replies
As for every ALTER TABLE command, you can address 1-n columns; so yes, it's possible.

@olafhelper What would be the t-sql query ? Example table name: [Main].[SampleTable]