Granting privileges
We can grant priviliges on tables and functions/procedures using GRANT. Let’s see a couple of example to better understand it.
We can grant privileges for common DML statements (select, insert, update and delete). We use sentences like this:
GRANT select, insert ON mytable TO myuser;
We can also grant privileges for some DDL statements. If we want to let an user modify the structure of a table, we use a sentence like this:
GRANT alter ON mytable TO myuser;
Another use of the GRANT sentence is to give permission to execute procedures and functions.
GRANT execute ON myfunction TO myuser;