Creates a new SQL Server login and then maps that login to a new database user : sp_addlogin « System Functions « SQL Server / T-SQL Tutorial






USE Master
GO
sp_addlogin 'Paul',
 --USE AdventureWorks2000
GO
sp_grantdbaccess 'Paul',
SQL Server 2000 Windows login:








25.17.sp_addlogin
25.17.1.Creates a new SQL Server login and then maps that login to a new database user
25.17.2.A statement that creates a new SQL Server login ID