This topic describes how to drop a role that you no longer need by using the DROP ROLE statement.
Prerequisites
You have the CREATE USER privilege. For more information about how to view your privileges, see View user privileges. If you do not have the required privilege, contact the administrator to obtain the privilege. For more information about how to grant privileges to a user, see Grant direct privileges.
Notice
When you drop a role, the system automatically revokes the role from all users and roles that are granted the role and deletes it from the database.
Examples
Drop the role named
role1.obclient [oceanbase]> DROP ROLE role1;Drop the
role1androle2roles.obclient [oceanbase]> DROP ROLE role1,role2;
References
For more information about the DROP ROLE statement, see DROP ROLE.