Column-Level Security vs Data Masking
People think closing a column and masking it do the same job. A closed column cannot be read at all. A query that asks for it fails with an error. A masked column can be read, but the value comes back hidden, like a card number shown as stars. Closing suits fields a role never needs. Masking suits fields a role needs to see exist.
Column-Level Security
People may read a table but not all its columns. The private columns stay closed.
Column-level security lets people read a table but not every column in it. A rule says which roles may see which columns. A support agent may see a name and an order, but not a card number. Asking for a blocked column gives an error, not the data. This keeps one table useful for many teams. The private columns stay closed.
Data Masking
Showing stars in place of a private value. The real one is still kept.
Data masking hides private values by showing a covered version. An email might show only its first letter. A card number might show only its last four digits. With dynamic masking, the real data stays in the table. A rule checks who is asking and shows the real value only to some roles. Static masking makes a covered copy, such as for a test system.
In one line
- Column-Level Security
- People may read a table but not all its columns. The private columns stay closed.
- Data Masking
- Showing stars in place of a private value. The real one is still kept.