Mega Code Archive

 
Categories / MSSQL / System
 

Creates a new SQL Server login and then maps that login to a new database user

USE Master GO CREATE LOGIN Paul WITH Password = 'P@ssword1' GO USE AdventureWorks GO CREATE USER Paul FOR Login Paul SQL Server 2005 Windows login.