Saturday, 13 August 2022

find number of columns in each object in Oracle Database

Each object order by number of column

select table_name, count(*) from all_tab_columns where owner = 'username' group by table_name order by 2 desc ;


find number of columns for specific object 

select count(*) from all_tab_columns where owner = 'USERNAME'  and table_name = 'TABLE_NAME';

No comments:

Post a Comment