FirebirdSQL logo

Examples of Role Assignment

  1. Assigning the DIRECTOR and MANAGER roles to the user IVAN:

    GRANT DIRECTOR, MANAGER
      TO USER IVAN;
  2. Assigning the MANAGER role to the user ALEX with the authority to assign this role to other users:

    GRANT MANAGER
      TO USER ALEX WITH ADMIN OPTION;
  3. Assigning the DIRECTOR role to user ALEX as a default role:

    GRANT DEFAULT DIRECTOR
      TO USER ALEX;
  4. Assigning the MANAGER role to role DIRECTOR:

    GRANT MANAGER
      TO ROLE DIRECTOR;
See also

REVOKE

The WITH GRANT OPTION Clause

The optional WITH GRANT OPTION clause allows the users specified in the user list to grant the privileges specified in the privilege list to other users.

Caution

It is possible to assign this option to the user PUBLIC.Do not do this!