Use the DROP USER command to delete a user account from the system. If the user owns any database objects, the system returns an error message and does not drop the user. You must drop or change the owner of those objects before you can drop the user.
DROP USER <name>
| Input | Description |
|---|---|
| <name> | The name of the user account that is to be deleted from the system. |
| Output | Description |
|---|---|
| DROP USER | The user account was successfully deleted. |
| ERROR: Drop user: user "<name>" does not exist | A user account with the specified name does not exist. |
| DROP USER: User "<name>" owns objects, cannot be removed | The user owns one or more objects. You must drop or change the ownership of all such objects before you can drop the user who owns them. |
You must be an administrator, or your account must have the Drop privilege for the user to be dropped or for the User object class.
MYDB.SCH1(USER)=> DROP USER jonathan;
DROP USER