There is a user with read permissions on my SQL Server. I don't want them to see my critical columns on a table. How can I censor those columns to the user?

Could I use data masking?


Probably easiest to solve with DCL:

DENY SELECT ON data1.table (column3) TO user1;

Other ways is to create a view where the critical columns is not exposed, and grant select on that view to the user. Needless to say you should revoke any privileges on the table from that user


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.