I have an schema [A], which has a package in which a function calls another schema’s[B] table [tableB].
When I compiled the package I got the error, “table or view doesnt exit” I googled and found that the error is because my package is calling another schema’s table.
Later I found that I have to grant privilage in the called schema[B]. In Schema B’s package I wrote the following code
procedure givePrivilege
begin
GRANT SELECT ON tableB TO A;
end;
Im new to Oracle and Im struck.
As B, you simply need to grant A
SELECTprivileges on the table. You don’t need to create a procedure that grants the privilege. You simply need to execute theGRANTstatement while logged in as B.