PROBLEM
I am creating a new login in my SQL Server and I want to check if the login exists, if not, then I have to execute the following query to create a new login.
Can anyone help me in checking whether the login exists or not using query?
Can anyone help me in checking whether the login exists or not using query?
USE [master]
GO
CREATE LOGIN [Emsmgr1] WITH PASSWORD=N'welcome', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
GOSOLUTION
Try querying
select name from master..syslogins
No comments:
Post a Comment