sp_dropuser

Description

Drops a user from the current database.

Syntax

sp_dropuser name_in_db

Parameters

name_in_db

is the user’s name in the current database’s sysusers table.

Examples

Example 1

Drops the user “albert” from the current database. The user “albert” can no longer use the database:

sp_dropuser albert

Usage

Permissions

Only the Database Owner, a System Administrator, or a System Security Officer can execute sp_dropuser.

See also

Commands grant, revoke, use

System procedures sp_addalias, sp_adduser, sp_bindexeclass, sp_droplogin