This SQL Server tutorial explains how to use the SQL Server DROP USER statement with syntax and examples.
Description
The DROP USER statement is used to remove a user from the SQL Server database.
Syntax
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.
Note
- 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.
Example
Let’s look at how to drop a user using the DROP USER statements in SQL Server.
For example:
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.
Thanks – Enjoyed this blog post, how can I make is so that I get an alert email whenever you publish a new post?
Aw, this was a really nice post. In concept I wish to put in writing like this additionally ?taking time and actual effort to make an excellent article?however what can I say?I procrastinate alot and certainly not seem to get something done.
I have been absent for a while, but now I remember why I used to love this website. Thanks , I will try and check back more frequently. How frequently you update your website?