Forum Discussion
Layan1
Jan 18, 2023Copper Contributor
Masking entire table in one line of script - DDM
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
Sort By
- mihaidCopper Contributorno
- olafhelperBronze ContributorAs for every ALTER TABLE command, you can address 1-n columns; so yes, it's possible.
- Marcin RachwalskiCopper Contributor
olafhelper What would be the t-sql query ? Example table name: [Main].[SampleTable]
- olafhelperBronze ContributorFor the ALTER TABLE syntax see
https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql?view=sql-server-ver16