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

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

DENY Statement

The DENY statement prevents users from performing actions. 
This statement has the following syntax form:
DENY permission_list [ON scope]
TO principal_list [CASCADE]
[AS {windows_group|sqlserver_login|db_user|db_role|appl_role}]
DENY CREATE TABLE, CREATE PROCEDURE TO peter, paul


The DENY statement is used to explicitly prohibit a user or role members from performing a specific action on an object.

DENY INSERT ON Product TO Paul
DENY EXEC ON spDeletePurchaseEmployee TO Paul