In Oracle Live SQL or the new site freesql.com I get the error:
Procedure SQL_412O2MIBCO60OPO6N1TOIDIDDK.PROC1 compiled
LINE/COL ERROR
--------- -------------------------------------------------------------
5/2 PL/SQL: SQL Statement ignored
6/45 PL/SQL: ORA-00942: table or view "SCOTT"."EMP" does not exist
Errors: check compiler log
Elapsed: 00:00:00.018
After I ask for creation of procedure (with user as retrieved from My Schemas):
create or replace Procedure SQL_412O2MIBCO60OPO6N1TOIDIDDK.proc1 is
nom varchar2(30);
com number(5);
begin
select ename, comm into nom, com from scott.emp
where comm = (select max (comm) from scott.emp);
dbms\_output.put\_line('Empleado: '||nom||' Comisión: '||com);
end;
/
Why my procedure does not have access to the same schemas that I already have access in anonymous blocks?
Thank you for your time.
Pablo