DROP RESOURCE GROUP statement removes a resource group.
To use DROP RESOURCE GROUP, you must first enable resource groups.
Required privileges
Only members of theadmin role can drop resource groups.
Synopsis
Parameters
Considerations
DROP RESOURCE GROUP does not check whether sessions, roles, or databases are assigned to the resource group. After a group is dropped:
- Sessions that are assigned to the group keep the group name in their
resource_groupsession variable. Their work runs in the built-in default resource group, and the session receives a notice. - Role and database defaults that name the group are not removed. New sessions that use those defaults also run in the default resource group.
SHOW DEFAULT SESSION VARIABLES FOR ROLE.
Examples
Drop a resource group
The following statements create a resource group namedbatch and then drop it:
Drop a resource group only if it exists
The following statement does nothing, because thebatch resource group no longer exists:
IF EXISTS, the statement returns an error:
Drop a resource group that a session is assigned to
The following statements create a resource group namedreporting and assign the current session to it:
resource_group session variable still shows the dropped group’s name:
resource_group session variable again, or reset it with RESET resource_group.

