I expected the code like:
create or replace procedure dmp(t in varchar2)
AS
BEGIN
EXECUTE IMMEDIATE 'SELECT * FROM ' || t;
END;
/
BEGIN
dmp('SOMETABLE');
END;
to be the same as SELECT * FROM SOMETABLE
. However, calling the stored procedure does not actually output anything -- for any table, including the obviously non-empty ones... Why is that? How would I write a stored procedure, that would output result(s) of queries inside it?