Concept - GRANT and REVOKE
GRANT {privileges | role} [ON table] TO {user | role | PUBLIC}
[IDENTIFIED BY password] [WITH GRANT OPTION]
REVOKE {privileges | role} [ON table] FROM {user | role | PUBLIC}Examples (s.22): GRANT SELECT ON ANY TABLE TO john; REVOKE SELECT ON ANY TABLE FROM john. Typical rights: SELECT, INSERT, UPDATE, DELETE.
| Right | Meaning (s.23) |
|---|---|
| SELECT | read the entire database, individual tables or specific columns |
| INSERT | insert rows in a table, or rows with values for specific columns |
| UPDATE | similar to INSERT |
| DELETE | delete rows from a table |
Clauses (s.24): TO = user or role getting the rights; PUBLIC = any user; IDENTIFIED BY = a password that must be used to revoke the rights of this GRANT (as printed on the slide); WITH GRANT OPTION = grantee can grant the right to others, with or without the grant option.
Related: Concept - Database Access Control Policies, Concept - Copy Flag and Transfer Rules (added context: a similar delegation idea in deck 04, not linked on the slides). Appears in 05 Database Security - Chunk 01 (s.1-38).