-
-
Save justinyoo/a0fcf112bda27c09ac54747c56e5fe11 to your computer and use it in GitHub Desktop.
Azure SQL Pro Tip - Creating Login Account and User
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS(SELECT * FROM sys.database_principals WHERE name = '<LOGIN_ACCOUNT>') | |
DROP USER [<LOGIN_ACCOUNT>] | |
DROP LOGIN [<LOGIN_ACCOUNT>] | |
GO | |
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'<LOGIN_ACCOUNT>') | |
CREATE LOGIN [<LOGIN_ACCOUNT>] WITH PASSWORD=N'<ACCOUNT_PASSWORD>' | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment