Examples of GRANT <privilege>
on Tables
-
SELECT
andINSERT
privileges to the userALEX
:GRANT SELECT, INSERT ON TABLE SALES TO USER ALEX;
-
The
SELECT
privilege to theMANAGER
,ENGINEER
roles and to the userIVAN
:GRANT SELECT ON TABLE CUSTOMER TO ROLE MANAGER, ROLE ENGINEER, USER IVAN;
-
All privileges to the
ADMINISTRATOR
role, together with the authority to grant the same privileges to others:GRANT ALL ON TABLE CUSTOMER TO ROLE ADMINISTRATOR WITH GRANT OPTION;
-
The
SELECT
andREFERENCES
privileges on theNAME
column to all users and objects:GRANT SELECT, REFERENCES (NAME) ON TABLE COUNTRY TO PUBLIC;
-
The
SELECT
privilege being granted to the userIVAN
by the userALEX
:GRANT SELECT ON TABLE EMPLOYEE TO USER IVAN GRANTED BY ALEX;
-
Granting the
UPDATE
privilege on theFIRST_NAME
,LAST_NAME
columns:GRANT UPDATE (FIRST_NAME, LAST_NAME) ON TABLE EMPLOYEE TO USER IVAN;
-
Granting the
INSERT
privilege to the stored procedureADD_EMP_PROJ
:GRANT INSERT ON EMPLOYEE_PROJECT TO PROCEDURE ADD_EMP_PROJ;