Overview

GRANT ( privilege [, ...] | ( ALL PRIVILEGES ) )
ON [ TABLE ] table_name TO ( grantee | PUBLIC )
[ WITH GRANT OPTION ]

Description

Grants specific permissions to the specified grantee.

  • Specifying ALL PRIVILEGES grants the DELETE, INSERT, and SELECT permissions.
  • Specifying PUBLIC grants permissions to all users.
  • The WITH GRANT OPTION clause allows the grantee to grant these permissions to others.

Examples

GRANT INSERT, SELECT ON orders TO alice; --- Grants permissions to user Alice
GRANT SELECT ON nation TO alice WITH GRANT OPTION; --- Grants the SELECT permission to user Alice and allows Alice to grant the `SELECT` permission to others.
GRANT SELECT ON orders TO PUBLIC; --- Grants the `SELECT` permission on the table "order" to everyone.

Limits

Some connectors may not support GRANT.