postgre查询表和记录数,查表字段

select relname as TABLE_NAME, reltuples as rowCounts from pg_class where relkind = 'r'
and relnamespace = (select oid from pg_namespace where nspname='public') order by rowCounts desc;

 

select * from information_schema.columns
where table_schema='public' and table_name='表名称 ';

 

posted @ 2019-06-19 17:46  君子笑而不语  阅读(4132)  评论(0编辑  收藏  举报