Skip to Content
SQL Server 2014 Development Essentials
book

SQL Server 2014 Development Essentials

by Basit A. Masood-Al-Farooq
July 2014
Intermediate to advanced
214 pages
4h 47m
English
Packt Publishing
Content preview from SQL Server 2014 Development Essentials

Grant, deny, and revoke permissions to securables

You can use SQL Server Management Studio or the T-SQL DCL statements to grant, revoke, and deny permissions to securables.

Grant, deny, and revoke permissions to securables with T-SQL DCL statements

In this section, we will use T-SQL DCL statements to grant, deny and revoke permissions.

Granting permissions to securables with T-SQL DCL statements

We use the GRANT keyword to grant permissions to securables. The basic syntax for the GRANT statement is as follows:

GRANT permission [,…n]
TO <grantee_principal> [,…n] [WITH GRANT OPTION]
[AS <grantor_principal>]

We use WITH GRANT OPTION when we want the user to grant the same permission to other logins.

For example, to grant Bob the SELECT permission WITH GRANT ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What's New in SQL Server 2012

What's New in SQL Server 2012

Rachel Horder
Mastering SQL Server® 2008

Mastering SQL Server® 2008

Michael Lee, Gentry Bieker
Microsoft® SQL Server 2012 Unleashed

Microsoft® SQL Server 2012 Unleashed

Ray Rankins, Paul T. Bertucci, Chris Gallelli, Alex T. Silverstein

Publisher Resources

ISBN: 9781782172550Supplemental Content