Help Center/
GaussDB/
Developer Guide(Distributed_V2.0-8.x)/
SQL Reference/
SQL Syntax/
D/
DROP ROLE
Updated on 2025-05-29 GMT+08:00
DROP ROLE
Description
Deletes a role.
Syntax
DROP ROLE [ IF EXISTS ] role_name [, ...];
Parameters
- IF EXISTS
Reports a notice instead of an error if the specified role does not exist.
- role_name
Specifies the name of the role to be deleted.
Value range: an existing role name
Examples
-- Create role role11. gaussdb=# CREATE ROLE role11 PASSWORD '********'; CREATE ROLE -- Delete role role11. gaussdb=# DROP ROLE IF EXISTS role11; DROP ROLE -- Delete role role12 that does not exist. gaussdb=# DROP ROLE IF EXISTS role12; NOTICE: role "role12" does not exist, skipping DROP ROLE
Helpful Links
CREATE ROLE, ALTER ROLE, and SET ROLE
Parent topic: D
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot