FirebirdSQL logo

Examples of GRANT <privilege> on Tables

  1. SELECT and INSERT privileges to the user ALEX:

    GRANT SELECT, INSERT ON TABLE SALES
      TO USER ALEX;
  2. The SELECT privilege to the MANAGER, ENGINEER roles and to the user IVAN:

    GRANT SELECT ON TABLE CUSTOMER
      TO ROLE MANAGER, ROLE ENGINEER, USER IVAN;
  3. All privileges to the ADMINISTRATOR role, together with the authority to grant the same privileges to others:

    GRANT ALL ON TABLE CUSTOMER
      TO ROLE ADMINISTRATOR
      WITH GRANT OPTION;
  4. The SELECT and REFERENCES privileges on the NAME column to all users and objects:

    GRANT SELECT, REFERENCES (NAME) ON TABLE COUNTRY
    TO PUBLIC;
  5. The SELECT privilege being granted to the user IVAN by the user ALEX:

    GRANT SELECT ON TABLE EMPLOYEE
      TO USER IVAN
      GRANTED BY ALEX;
  6. Granting the UPDATE privilege on the FIRST_NAME, LAST_NAME columns:

    GRANT UPDATE (FIRST_NAME, LAST_NAME) ON TABLE EMPLOYEE
      TO USER IVAN;
  7. Granting the INSERT privilege to the stored procedure ADD_EMP_PROJ:

    GRANT INSERT ON EMPLOYEE_PROJECT
      TO PROCEDURE ADD_EMP_PROJ;

The EXECUTE Privilege

The EXECUTE privilege applies to stored procedures, stored functions (including UDFs), and packages.It allows the grantee to execute the specified object, and, if applicable, to retrieve its output.

In the case of selectable stored procedures, it acts somewhat like a SELECT privilege, insofar as this style of stored procedure is executed in response to a SELECT statement.

Note

For packages, the EXECUTE privilege can only be granted for the package as a whole, not for individual subroutines.