SQL$HELP_OLD72.HLB  —  DROP  ROLE
    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

  DROP ROLE ---> <role-name> -+-+-----------------+-+-->
                              | +---> CASCADE   --+ |
                              | +---> RESTRICT  --+ |
                              | +---> IF EXISTS --+ |
                              +------------<--------+

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
Close Help