Answers for "get table count in postgres"

SQL
0

postgres list tables and row counts

SELECT schemaname,relname,n_live_tup
  FROM pg_stat_user_tables
  ORDER BY n_live_tup DESC;
Posted by: Guest on July-13-2021
0

count column of tables psql

1
2
3
4
select table_name, count(*) as column_count 
from information_schema."columns"
where table_schema = 'public' 
GROUP by table_name order by column_count desc;
Posted by: Guest on November-14-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language