Postgresql查看表结构和字段注释

Postgresql查看表结构和字段注释

一:查看表结构(字段)信息:
Select table_name,column_name,data_type,character_maximum_length from information.columns where table_schema='dd' and table_name='department';
二:查看字段注释信息:
Select a.attnum,(select description from pg_catalog.pg_description where objoid=a.attrelid and objsubid=a.attnum) as descript ,a.attname,pg_catalog.format_type(a.atttypid,a.atttypmod) as data_type from pg_catalog.pg_attribute a where 1=1 and a.attrelid=(select oid from pg_class where relname='department' ) and a.attnum>0 and not a.attisdropped order by a.attnum;

目前创新互联建站已为1000+的企业提供了网站建设、域名、网站空间、网站托管维护、企业网站设计、丹棱网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

  • 注释:其中dd为schema名字,department为表名*

当前名称:Postgresql查看表结构和字段注释
网站链接:http://lszwz.com/article/igehcs.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款