grant-role.md 1.3 KB


title: "GRANT ROLE" description: "GRANT grants membership of one role to another role." menu: main:

parent: commands

GRANT grants membership of one role to another role. Roles can be members of other roles, as well as inherit all the privileges of those roles.

Syntax

{{< diagram "grant-role.svg" >}}

Field Use
_rolename The role name to add _membername as a member.
_membername The role name to add to _rolename as a member.

Examples

GRANT data_scientist TO joe;
GRANT data_scientist TO joe, mike;

Privileges

The privileges required to execute this statement are:

{{< include-md file="shared-content/sql-command-privileges/grant-role.md" >}}

Useful views

Related pages