SQL Authorization

Example

Create the PAT role, and grant ability to access the PAYROLL database to PAT.

create role PAT
grant connect on PAYROLL to PAT

Grant ability to query table EMPLOYEE to the payroll project team:

grant select on EMPLOYEE to PAT

Add Jim to the payroll project team:

grant PAT to Jim