DROP LOGIN command in SQL Server
The tutorial explains how to use the DROP LOGIN command in SQL Server with syntax and examples.
The DROP LOGIN command is used to delete an identity (which is the Login login account) used to connect to SQL Server.
Syntax of DROP command LOGIN
DROP LOGIN ten_dangnhap; Variable name or variable value
Username
The login name of the login account (Login) needs to be deleted.
Note
- Cannot delete the login account currently logged into SQL Server.
- If you delete the login account that the database user has mapped to, the user will be disconnected to SQL Server.
- See also the CREATE LOGIN and ALTER LOGIN commands.
For example
DROP LOGIN quantrimang; For example, the DROP LOGIN command above will delete the login account quatrimang. This command can only run if quantrimang is currently not logged in. Otherwise, this command will fail.
Previous lesson: ALTER LOGIN command in SQL Server
The following article: Find Login in SQL Server
Discover more
MS SQL Server SQL Server mssqlShare by
Jessica Tanner
Update 25 May 2019
You should read it
- Find Login in SQL Server
- DROP USER command in SQL Server
- How to Unlock SQL Server Account
- How to delete the database in MS SQL Server
- Instructions to create, change, delete Windows 7 login password
- The Quiet Details That Make a Sports Betting Platform Feel Reliable
- Instructions on creating toy set images with ChatGPT AI
- How are AI agents changing the journalism industry?
- Find Login in SQL Server
- New points in SQL Server 2017
- The CREATE USER command in SQL Server