Search code examples
sqloracle-databasesecuritypolicy

SQL Database Restrict View of Data


Okay so I am new to SQL and was just wondering if there where a way to limit who would have access to what type of data in terms of when retriving information from the tables. Like for example I had a table with information about a client which would have his name, phone, address, SSN, salary, and etc. I want to figure out if there is a way to limit what is being shown based on who is viewing that data. As in a Person A can see everything while Person B can see everything except for SSN and Salary

EDIT:

Could the use of a trigger to limit the view of a certain group work?


Solution

  • You can use views. After that it depends on usage, how the persons access to data (some access rights or user groups etc.)