List tables with the largest number of columns in Vertica database

Query that returns tables with number of columns, ordered from the ones that have the most.


select table_schema,
       count(*) as columns
from v_catalog.columns
group by table_schema,
order by columns desc;


  • table_schema - name of the schema
  • table_name - name of the table
  • columns - number of columns in table


  • One row represents one table in a database
  • Scope of rows: all tables in a database
  • Ordered by number of columns descending - from tables with the most columns

Sample results

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
There are no comments. Click here to write the first comment.