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

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

A REVOKE statement that revokes all permissions for the Bankers table

   <source lang="sql">

REVOKE ALL ON Bankers FROM [Payroll\MarkThomas]</source>


A REVOKE statement that revokes permission to create databases and tables

   <source lang="sql">

REVOKE CREATE DATABASE, CREATE TABLE FROM [Administration\SylviaJones]</source>


A REVOKE statement that revokes SELECT permission

   <source lang="sql">

REVOKE SELECT ON Billings FROM [Accounting\JaneSmith]</source>


A REVOKE statement that revokes the DELETE permission

   <source lang="sql">

REVOKE DELETE ON Billings FROM [Accounting\JaneSmith]</source>


REVOKE permissions

   <source lang="sql">

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></source>


REVOKE Statement

   <source lang="sql">

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</source>