Skip to main content
Version: V1.0.0

DROP ROLE

Description​

This statement is used to drop a role.

Limitations and Considerations​

  • When a role is dropped, the system automatically revokes the role from all users and roles that have been granted the role and then drops the role from the database.
  • Roles specified in the mandatory_roles system variable cannot be dropped.
  • When multiple roles are dropped at the same time, if any role cannot be dropped successfully, the entire drop operation will be rolled back, and none of the roles will be dropped.

Privileges​

To drop a role, the current user must have the CREATE USER or DROP ROLE privilege. For more information about seekdb privileges, see seekdb Privilege Types.

Syntax​

DROP ROLE role_name [, role_name ...];

Parameters​

ParameterDescription
role_nameThe name of the role to be dropped. When dropping multiple roles, separate the role names with commas (,).

Examples​

Drop the role001 role.

DROP ROLE role001;

References​