Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If there is a customer table, and some extra-private/secure information like SSN is there, should I create another table to store such information and lock that table so only certain people can view it even though it's strictly one-to-one? or can columns be locked too from unauthorized viewing based on rights?

Even if both types of security mechanism do exist, is one preferred over the another? I might have said something very vague but I've used SQL Server more often.

share|improve this question

migrated from Apr 26 '12 at 5:59

This question came from our site for system and network administrators.

You can grant column level privileges for INSERT, REFERENCES, and UPDATE, but a standard grant cannot be used to limit SELECT privileges on a specific column.

You can do column level masking with a Virtual Private Database (VPD) policy restricting columns using the sec_relevant_cols parameter. The feature required Enterprise Edition.

mrdenny is right, the other way to do this is to create a view which does not select the column or does, but masks it.

share|improve this answer
I'll remove my info about column level permissions. – mrdenny Apr 26 '12 at 21:14

Create a view which simply selects all the other columns form the table in question excluding the columns that you don't want the people to have access to. Give them rights to query the view and not the table.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.