• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 20. Security > SQL Commands for Granting Permissions

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:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint