SQL Server/T-SQL Tutorial/User Role/REVOKE

Материал из SQL эксперт
Перейти к: навигация, поиск

A REVOKE statement that revokes all permissions for the Bankers table

REVOKE ALL ON Bankers FROM [Payroll\MarkThomas]


A REVOKE statement that revokes permission to create databases and tables

REVOKE CREATE DATABASE, CREATE TABLE
FROM [Administration\SylviaJones]


A REVOKE statement that revokes SELECT permission

REVOKE SELECT
ON Billings
FROM [Accounting\JaneSmith]


A REVOKE statement that revokes the DELETE permission

REVOKE DELETE
ON Billings
FROM [Accounting\JaneSmith]


REVOKE permissions

To revoke permission means to remove the current set of permissions for an object and user or role.
This could have the effect of removing an explicit GRANT or DENY, if either exists.

30> REVOKE INSERT ON Product TO Paul
31> REVOKE EXEC ON spDeletePurchaseEmployee TO Paul
32>


REVOKE Statement

The REVOKE statement removes one or more already-granted (or denied) permissions. 
This statement has the following syntax:
REVOKE [GRANT OPTION FOR] permission_list [ON scope]
FROM principal_list [CASCADE]
[AS {windows_group|sqlserver_login|db_user|db_role|appl_role}]

REVOKE SELECT ON project
FROM PUBLIC