Valid in: SQL, ESQL
The Drop Role statement removes the specified role identifiers from the installation. Any session using a role identifier when the identifier is dropped continues to run with the privileges defined for that identifier. For more information about role identifiers, see the Database Administrator Guide.
The Drop Role statement has the following format:
[EXEC SQL] DROP ROLE role_id {, role_id};
Must be an existing role identifier. If the list of role_ids contains any that do not exist, the DBMS Server returns an error for each non-existent role_id, but does not abort the statement. Others in the list that are valid, existing role identifiers, are removed.
In an embedded Drop Role statement, role_id cannot be represented with a host language variable.
You must have the maintain_user privilege and be connected to the iidbdb database.
The Drop Role statement locks pages in the iirole catalog in the iidbdb.
The following example drops the sales_report role identifier:
drop role sales_report;