Drops a role previously created with the CREATE ROLE or GRANT statement.
1 – Environment
You can use the DROP ROLE statement: o In interactive SQL o Embedded in host language programs o As part of a procedure in an SQL module or other compound statement o In dynamic SQL as a statement to be dynamically executed
2 – Format
(B)0[m[1;4mDROP[m[1m [1;4mROLE[m[1m qqq> <role-name> qwqwqqqqqqqqqqqqqqqqqwqwqq> [m [1m x tqqq> [1;4mCASCADE[m[1m [m [1mqqu x [m [1m x tqqq> [1;4mRESTRICT[m[1m [m [1mqqu x [m [1mx[m [1mmqqq>[m [1;4mIF[m[1m [1;4mEXISTS[m [1mqqj[m [1mx[m [1mmqqqqqqqqqqqq<qqqqqqqqj[m
3 – Arguments
3.1 – CASCADE
Drops the specified role from the database and deletes all references to this role that exist in other roles and access control lists (ACLs).
3.2 – IF_EXISTS
Prevents SQL command language from displaying error messages if the referenced object does not exist in the database.
3.3 – RESTRICT
Drops the specified role. If there are any references to this role in another role or ACL, then the DROP ROLE statement fails. The RESTRICT clause is the default.
3.4 – role-name
An existing role-name in the database (such as one created with the CREATE ROLE statement). You cannot specify one of the predefined roles.
4 – Examples
Example 1: Dropping a Role from the Database SQL> SHOW ROLES; Roles in database with filename mf_personnel.rdb DOCUMENTATION SQL> DROP ROLE DOCUMENTATION RESTRICT; SQL> SHOW ROLES; Roles in database with filename mf_personnel.rdb No Roles Found