Oracle Database 12c: SQL Fundamentals — Question 44
You need to perform these tasks:
1. Create and assign a MANAGER role to Blake and Clark
2. Grant CREATE TABLE and CREATE VIEW privileges to Blake and Clark
Which set of SQL statements achieves the desired results?
Answer options
- A. CREATE ROLE manager; GRANT create table, create view TO manager; GRANT manager TO BLAKE, CLARK;
- B. CREATE ROLE manager; GRANT create table, create voew TO manager; GRANT manager ROLE TO BLAKE, CLARK;
- C. GRANT manager ROLE TO BLAKE, CLARK; GRANT create table, create voew TO BLAKE CLARK; ***MISSING***
Correct answer: A
Explanation
Option A is correct because it properly creates the MANAGER role, grants the necessary privileges to that role, and then assigns the role to both Blake and Clark. Option B contains a typo in 'create voew' instead of 'create view', rendering it invalid. Option C incorrectly attempts to grant the role before it has been created and also has a typo, which makes it invalid.