GRANT SELECT ON tableName TO something\user_name
Unfortunately, when I execute this in SQL Server 2008 R2 I get an Incorrect syntax near '\'.
error.
Is there a way to escape a backslash, or what should I do?
When a backslash immediately precedes a new line in a string literal both the backslash and the new line are removed. If you actually require a string literal with a backslash followed by carriage returns you can double them up.
Grant in SQL Server SQL Grant is used to provide permissions like Select, All, Execute to user on the database objects like Tables, Views, Databases and other objects in a SQL Server. Here privilageName is the access right or permission that is granted to the user like All, Select, Execute.
GRANT SELECT ON tableName TO [something\user_name]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With