DROP USER

Name

DROP USER  --  Removes a user account from a database.

Synopsis

DROP USER name
  

Parameters

name

The sole parameter of this command is the username of the account you wish to remove.

Results

DROP USER

This message is displayed if the user account is successfully deleted.

ERROR: DROP USER: user "name" does not exist

This error is displayed if the user account cannot found.

DROP USER: user "name" owns database "name", cannot be removed

This message is displayed if you try to drop a user account that owns an existing database. You must drop the datbase that the user owns before you will be able to drop the user.

Description

Use the DROP USER command to remove a user from the database. You are not allowed to remove a user that owns a database. All database objects the user owned will continue to exist within the database.

To run this command from the command prompt, use dropuser, which is essentially the same command.

Examples

The following example demonstrates how to drop the user account named jonathan.

DROP USER jonathan;