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
  • 732,580
  • 175
  • 1,330
  • 1,459

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,820
  • 3
  • 27
  • 38