

-- drop the users
DROP USER john;
DROP USER jane;
DROP USER jim;

-- drop the role
DROP ROLE ar_user;

-- drop the synonym
DROP PUBLIC SYNONYM customers;



-- create the role
CREATE ROLE ar_user;

GRANT CREATE SESSION TO ar_user;
GRANT CREATE PUBLIC SYNONYM TO ar_user;
GRANT SELECT ON customers TO ar_user;
GRANT INSERT ON customers TO ar_user;





GRANT ar_user TO john, jane, jim;

GRANT DELETE ON customers TO john;


CREATE PUBLIC SYNONYM customers FOR ar.customers;


SELECT customer_first_name FROM customers;


SELECT customer_first_name FROM customers;


REVOKE CREATE PUBLIC SYNONYM FROM ar_user;
REVOKE ar_user FROM jim;
REVOKE DELETE ON customers FROM john;
