尝试向用户授予特定角色时不断收到错误:
Grant role role_1 to maintenance;
错误:
#role_1'
附近的语法不正确
想要对其进行编辑,以便授予用户使用授权角色
答案 0 :(得分:0)
GRANT {role_name} TO {user_name};
对于T-SQL,这是GRANT
的简化语法GRANT { ALL [ PRIVILEGES ] }
| permission [ ( column [ ,...n ] ) ] [ ,...n ]
[ ON [ class :: ] securable ] TO principal [ ,...n ]
[ WITH GRANT OPTION ] [ AS principal ]
在您的情况下,只需
GRANT role_1 TO maintenance;