Syntax
Grant database privileges to a user.SELECT privilege can be assigned and revoked.
Grant source 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. |
Grant privileges on future objects
To grant privileges that apply automatically to future objects created by a user, use theALTER DEFAULT PRIVILEGES command. It sets default privileges without manually granting permissions for each new object.
Example
Grant all privileges for all sources inschema1 to user user1.
mv1, which is in schema schema1 of database db1, to user user1. user1 is able to grant the SELECT privilege other users.
s1 to user user1.