pgsql查询表信息、列名
2019-11-26 本文已影响0人
witty_drip
得到所有表信息
select * from information_schema.columns
where table_schema='basisdata' and table_name<>'pg_stat_statements';
得到所有表的列名
select column_name from information_schema.columns
where table_schema='basisdata' and table_name<>'pg_stat_statements';
得到表"day_app_derivate_cnt"的列名
select column_name from information_schema.columns
where table_schema='basisdata' and table_name='day_app_derivate_cnt';