Commands
GRANT
Use the GRANT
command to grant specific privileges to a user.
Syntax
Grant database privileges to a user.
Grant schema privileges to a user.
Grant table privileges to a user.
For sources and materialized views, only the SELECT
privilege can be assigned and revoked.
Grant source privileges to a user.
Grant materialized view privileges to a user.
Parameters
Parameter or clause | Description |
---|---|
WITH GRANT OPTION clause | The WITH GRANT OPTION clause allows the grantee to grant the privilege to other users. |
GRANTED BY clause | The specified user after the GRANTED BY clause must be the current user. By default, the current user is root. |
Example
Grant all privileges for all sources in schema1
to user user1
.
Grant the SELECT privilege for materialized view mv1
, which is in schema schema1
of database db1
, to user user1
. user1
is able to grant the SELECT privilege other users.
Grant the SELECT privileges for source s1
to user user1
.