
Privileges
What are Privileges
System Privileges
GRANT privilege [,privilege] TO USER [,user|role, Public]
- role:
named group of related privileges that can b e granted to a user
Object Privileges
GRANT object_priv [(columns)] ON object TO {user | role | Public} [with Grant Option];
With Grant Option: allows grantee to grant object to other users and roles. Objects granted with Grant option are revoked when grantor revokes privilege from user and those to whom they granted the privilege.
Example:
Grant select on manager_cash to public;
REVOKE {privilege [,privilege…] | All} ON object From {user [,user…] | role | Public} [Cascade Constraints];
Cascade constraints: removes referential integrity constraints made to the object by the References privilege.
Example:
Revoke select on manager_cash from public;