Multiple choice technology databases

OE and SCOTT are the users in the DB.the ORDERS tables is owned by OE.Evalute the statements by the DBA in the following sequence: CREATE ROLE r1; GRANT SELECT ,INSERT ON OE.ORDERS TO r1; GRANT r1 TO SCOTT; GRANT SELECT ON OE.ORDERS TO SCOTT; REVOKE SELECT ON OE.ORDERS FROM SCOTT; what is the output after executing the statements?

  1. SCOTT would be not able to query the OE.ORDERS tables

  2. SCOTT would be able to query the OE.ORDERS tables

  3. The revoke statment would remove the SELECT privilege from SCOTT as well as from the role r1

  4. The revoke statment would give an error because the select privilege has been granted to the role r1

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

SCOTT retains the SELECT privilege because it is still granted via the role r1 which is assigned to him. Revoking the direct SELECT privilege from SCOTT does not affect the privilege inherited through the active role, and it does not alter the role itself.