PostgreSQL库表字段信息
作者:互联网
数据库
SELECT * FROM "pg_database";
表信息
SELECT "schemaname","tablename","tableowner","hasindexes","hasrules",obj_description(relfilenode,'pg_class') AS "description" FROM "pg_tables" AS tb INNER JOIN "pg_class" cs ON cs.relname = tb.tablename WHERE tablename NOT LIKE 'pg%' AND tablename NOT LIKE 'sql_%' ORDER BY tablename;
字段信息
select "table_catalog","table_schema","column_name","ordinal_position","udt_name","character_maximum_length" from "information_schema"."columns" where "table_schema"='public' and "table_name"='TableName' order by "ordinal_position";
标签:PostgreSQL,name,tablename,表字,信息,pg,cs,table,schema 来源: https://www.cnblogs.com/honk/p/16265209.html