Create a user for SQL Server 2008?

前端 未结 3 1513
野的像风
野的像风 2021-02-08 07:54

I\'m using this code to create a new user.

/****** Object:  User [primebox] ******/
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N\'primebox         


        
3条回答
  •  隐瞒了意图╮
    2021-02-08 08:55

    In SQL Server, users are different to logins.

    To create a user for a database, you first have to create a login for the server using the create login syntax

提交回复
热议问题