T-SQL How to grant role to user

前端 未结 2 1443
孤城傲影
孤城傲影 2020-12-28 11:43

After creating roles and granting privileges to them, I want to grant the privileges of a specified role to a user, how to do with it? I tried grant to , but failed.

2条回答
  •  青春惊慌失措
    2020-12-28 12:30

    Because BOL shows sp_addrolemember has been deprecated, if you are using SQL Server 2012 you may want to use:

    ALTER ROLE  ADD MEMBER 
    

提交回复
热议问题