O'Reilly logo

Microsoft® Access Projects with Microsoft SQL Server™ by Natascha Nicol, Ralf Albrecht

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SQL Commands for Granting Permissions

Given the required permissions, you can use SQL commands to grant or revoke rights. Note that SQL does not recognize any commands that return the permissions of a user or a role. However, you can use another method, such as the system stored procedure sp_helprotect, described in the “System Stored Procedures for Users and Roles” section of this chapter.

Granting Rights with GRANT

You can use the GRANT command to authorize permissions for objects and statements. The general syntax to grant permissions for objects is as follows:

 GRANT { ALL [ PRIVILEGES ] | permission [ ,...n ] } { [ ( column [ ,...n ] ) ] ON { table | view } | ON { table | view } [ ( column [ ,...n ] ) ] | ON { stored_procedure | extended_procedure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required