DROP USER

Function

Deleting a user will also delete the schema having the same name as the user.

Precautions

  • Be cautious when using DROP OBJECT (e.g., DATABASE, USER/ROLE, SCHEMA, TABLE, VIEW) as it may cause data loss, especially with CASCADE deletions. Always back up data before proceeding.
  • For more information about development and design specifications, see "GaussDB(DWS) Development and Design Proposal" in the Data Warehouse Service (DWS) Developer Guide.

Syntax

DROP USER [ IF EXISTS ] user_name [, ...] [ CASCADE | RESTRICT ];

Parameter Description

Example

Delete user jim:

1
DROP USER jim CASCADE;

Links

ALTER USER, CREATE USER