Granting Privilege on SCHEMA I have two SCHEMA in a database(ABC,XYZ)

Now i want to create a user Test and grant select privilege only on SCHEMA (XYZ)

I know how to grant Privilege to a user, but confused how to grant privilege on specific SCHEMA?
That is not possible, the database does not support such grants.
You can grant the required privileges on each object individually in the schema.

For example:

begin
  for o in (select * from dba_tables where owner = 'XYZ')
  loop
    execute immediate 'grant read on "' || o.owner || '"."' || o.table_name || '" to ABC';
  end loop;
end;
/


It is better to create a role, grant that role to the other user, and maintain the grants to the role when you create new objects.



grant_system_privileges::=



grant_object_privileges::=



on_object_clause ::=