MSDN

DENY (Transact‑SQL)

The DENY statement explicitly denies a permission to a principal. A denied permission overrides any granted permission, ensuring that the principal cannot perform the specified action.

Syntax

DENY permission_name [ ,...n ]   
    ON { [ object :: ] securable }   
    TO principal [ ,...n ]   
    [ AS principal ]   

Parameters

Examples

Example 1 – Deny SELECT on a table

DENY SELECT ON dbo.Employees TO [JaneDoe];

Example 2 – Deny EXECUTE on a stored procedure

DENY EXECUTE ON OBJECT::dbo.usp_GetPayroll TO [SalesRole];

Remarks

See also