How to Remove Select Grant Microsoft SQL Database Table
Microsoft SQL Server is a Relational Database Management System RDMS which includes rich built in security features. Granting and revoking specific rights can easily be achieved at every level from an entire SQL database all the way down to individual table columns. Often times it becomes necessary to change a user's rights to certain tables. Revoking rights to a single database table can easily be achieved in minutes with just basic SQL query skills.
Instructions
-
How to Remove Select Grant Microsoft SQL Database Table
-
1
Open Microsoft SQL Server Management Studio.
-
2
Click on the "Connect" button.
-
-
3
Click on "Database Engine" in the pop-up menu.
-
4
Click on the "Server Name" combo box field and choose the SQL Server instance to connect to.
-
5
Click on the "Connect" button.
-
6
Click on the "+" to the left of the "Databases" folder.
-
7
Click on the database you with to retrieve data from.
-
8
Click on the "New Query" button, this will open a tab in the right window pane of the Management Studio where you can create SQL queries.
-
9
Enter the following SQL statement into the SQL query window replacing <table name> and <user name> with the name of your table and the user you wish to change rights for, respectively:
REVOKE SELECT ON <table name> TO <user name>
-
10
Click on "Execute" to run the query and change the "Select" rights on the table.
-
1
Tips & Warnings
These types of queries can be reused by simply changing the table name and/or user name, it is good practice to save queries for later use.
Be certain that the changes made are correct as changing rights for the incorrect user will prevent them from accessing data that they may need access to.