DROP ROLE
This page is part of MariaDB's Documentation.
The parent of this page is: SQL Statements for MariaDB Xpand
Topics on this page:
Overview
In 23.09, 6.1:
Deletes a role.
In 6.1:
Deletes a role.
In 6.0, 5.3:
Not present
See also: SQL Statements for MariaDB Xpand 23.09, in 6.1, in 6.0, and in 5.3
See also: SQL Statements for MariaDB Xpand 6.1
USAGE
Common Syntax:
DROP ROLE [IF EXISTS] <role_name> [, <role_name>] ...
DETAILS
The DROP ROLE
statement irreversibly deletes the role. If any users are granted the role, the grant will be revoked.
For Xpand, all objects are case-insensitive.
EXAMPLES
DROP ROLE
To delete a role:
DROP ROLE role1;
IF EXISTS
By default, if you try to delete a role that does not exist, an error is raised.
To prevent an error when the specified role is not present, add the IF EXISTS
clause:
DROP ROLE IF EXISTS role1;
If the specified role exists, it will be deleted. If the specified role does not exist, the query does not raise an error.
RELATED TOPICS
CHANGE HISTORY
Release Series | History |
---|---|
23.09 |
|
6.1 |
|
6.0 |
|
5.3 |
|
Release Series | History |
---|---|
6.1 |
|