How to avoid temporary table
Hi all,
I have written a well-running sqlplus script with Oracle RDBMS 19.11.0.0 :
create table HRZX_MOYE as (
select table_name, sum(num_rows) s from all_tables where tablespace_name='HRZX' group by table_name
union
select table_name, sum(num_rows) s from all_tab_partitions where tablespace_name='HRZX' group by table_name
) ;
select table_name, s from HRZX_MOYE where s>=(select avg(s) from HRZX_MOYE) order by s ;
drop table HRZX_MOYE ;
I receive correct table_name and size of tables with size bigger than the global average.
But, the temporary table HRZX_MOYE is not very pretty here, under SYS account.