title: how to check if the log-in exists in sql server?
body: <p>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.</p>
  
  <p>Can anyone help me in checking  whether the login exists or not using query?</p>
  
  <pre><code>USE [master]
  GO
  CREATE LOGIN [Emsmgr1] WITH PASSWORD=N'welcome', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
  GO
  </code></pre>