You are here: Reference Information > SQL Reference Information > SQL Statements > DROP USER

DROP USER

DROP USER — remove a database user

Syntax

DROP USER name [ IF EXISTS ]  

Description

Use the DROP USER statement to remove a user from the database.

If you use DROP USER to drop a user created with CREATE USER username EXTERNAL, the user will be dropped as an active NuoDB database user, but this will have no effect on the user's entry in the external LDAP server.

When you drop a user, NuoDB purges all of that user's schema objects from the database.

Parameters

Example

CREATE USER jonathan PASSWORD 'jonathan';
DROP USER jonathan;
 
DROP USER nosuchuser IF EXISTS;
DROP USER nosuchuser;
 user NOSUCHUSER doesn't exist