patternMinor
Grant to one; then revoke from all: does it work in Oracle SQL?
Viewed 0 times
oracleallsqlgrantrevokeoneworkthendoesfrom
Problem
Consider the following:
At the end of executing the above SQL script, will frank have 'select' access to the 'books' table?
- grant select on books to frank.
- revoke select on books from public.
At the end of executing the above SQL script, will frank have 'select' access to the 'books' table?
Solution
Yes, frank will be able to perform a select on books. Basically Oracle will use the most permissive privilege, which is the one allowing selection.
Reference: Documentation (under roles).
Note that this is different from you granting privileges with admin option to UserB, who in turn grants privileges to UserC. In this case revoking privileges from UserB would automatically "cascade" revoke them from UserC.
Reference: Documentation (under roles).
Note that this is different from you granting privileges with admin option to UserB, who in turn grants privileges to UserC. In this case revoking privileges from UserB would automatically "cascade" revoke them from UserC.
Context
StackExchange Database Administrators Q#9438, answer score: 2
Revisions (0)
No revisions yet.