Just substitute whatever you want to do to the empty tables in the appropriate point.Code:Declare l_tab_has_rows boolean; begin for user_tab in (select table_name from user_tables) loop execute immediate 'select count(*) from '||user_tab.table_name||' where rownum = 1' Into l_tab_has_rows; if l_tab_has_rows then dbms_output.put_line(RPad(user_tab.table_name,31)||': Y'); else dbms_output.put_line(RPad(user_tab.table_name,31)||': N'); end if; end loop; end; /




Reply With Quote