Skip to main content

Syntax

DROP USER [ IF EXISTS ] user_name [ , ... ];

Parameters

ParameterDescription
IF EXISTSDo not return an error if the specified user does not exist.
user_nameThe user you want to drop. - You cannot drop the current user; - To drop a superuser (user with the SUPERUSER privilege), you must be a superuser yourself; - To drop a non-superuser, you must have the CREATEUSER privilege. - The rwadmin user cannot be dropped as it is reserved for cloud control plane operations.

Examples

The following statement removes the user with the name “user1”.
DROP USER user1;
I