EXECUTE IMMEDIATE, MLOG$ and ORA-00903: invalid table name
Hi All,
I need to look into number of MV Log tables so I created a stored procedure as follows:
create or replace procedure plined_mloginfo(mlogname in varchar2) as mrowcounts integer; mtabsize integer; begin execute immediate 'select count(*) from :a' into mrowcounts using mlogname; execute immediate 'select bytes/1024/1024 from :b' into mtabsize using mlogname; dbms_output.put('Table : '||mlogname); dbms_output.put('Row counts: '||mrowcounts); dbms_output.put_line('Size: '||mtabsize); end;
Now when trying to execute it, I'm getting ORA-00903.
exec plined_mloginfo('"MLOG$_ABC"');
BEGIN plined_mloginfo('"MLOG$_ABC"'); END;
0