DROP LOGIN command in SQL Server
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
4 ★ | 1 Vote
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
- Ways to log in database on MS SQL Server
- DROP TABLE command in SQL Server
- How to enable the Login Login hidden on Windows 10
May be interested
- Find Login in SQL Serverare there any queries in sql server that return all login accounts and information about them?
- New points in SQL Server 2017the sql server 2017 version is primarily connected to linux, bringing the power of sql to linux. in short, you can install sql server 2017 on linux, using sql server 2017 on linux-based docker containers. sql server 2017 also allows you to choose development languages, develop it on-premise or cloud-based.
- The CREATE USER command in SQL Serverthis article will show you in detail how to use the create user command in sql server, with specific syntax and examples to better visualize and capture commands.
- Instructions for installing SQL Server 2017 step by stepsql server 2017 comes with new features in the installation process. it now supports the machine learning service for r and python. it also includes ssis scale out master and scale out worker.
- DROP USER command in SQL Serverthis article will show you in detail how to use the drop user command in sql server with specific syntax and examples to better visualize and capture commands.
- Find User in SQL Serverdo any queries on sql server return all user created?