This SQL Server tutorial explains how to use the SQL Server DROP USER statement with syntax and examples.
The DROP USER statement is used to remove a user from the SQL Server database.
The syntax for the DROP USER statements in SQL Server (Transact-SQL) is:
DROP USER user_name;
Parameters or Arguments
user_nameThe name of the user to remove from the SQL Server database.
- Before you can drop a user, you must delete objects owned by the user or transfer ownership of those objects.
- See also the CREATE USER statement.
Let’s look at how to drop a user using the DROP USER statements in SQL Server.
DROP USER adglob;
This DROP USER example would drop the user called adglob. This DROP USER statements will only run if adglob does not own any objects in the SQL Server database.