How to grant permission to an SQL User on a single table to prevent any specific Action?
How to grant permission to User on a single table in SQL server?
557
13-Nov-2024
Updated on 03-Jan-2025
Khushi Singh
03-Jan-2025For a general permission of a user on SQL Server on a single table, the command that is used is the
GRANTstatement. Here's how:Syntax:
Example:
If you want to give a user named
JohnSELECTpermission on a table calledEmployees:Common Permissions:
SELECT – To read data.
INSERT – To add data.
UPDATE – To modify data.
DELETE – To remove data.
Insert PERMISSION by the permission that you would like to allow in the function.
That’s it! After the last operation, the user has the necessary access to the table specified in the command.