0

Keep getting an error when trying to grant a specific role to user:

Grant role role_1 to maintenance;

Error:

Incorrect syntax near 'role_1'

Want to edit it so the Grant role to user works

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425

1 Answers1

0
GRANT {role_name} TO {user_name};

for T-SQL, Here's the simplified syntax for GRANT

GRANT { ALL [ PRIVILEGES ] }
      | permission [ ( column [ ,...n ] ) ] [ ,...n ]
      [ ON [ class :: ] securable ] TO principal [ ,...n ] 
      [ WITH GRANT OPTION ] [ AS principal ]

in your case, simply

GRANT role_1 TO maintenance;
Aung Myo Linn
  • 2,724
  • 3
  • 26
  • 37