码迷,mamicode.com
首页 > 数据库 > 详细

查询字段描述sql-postgresql

时间:2017-09-20 12:11:24      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:pos   col   blog   sel   mes   name   rip   oid   post   

查询字段描述sql

 

SELECT comment on column  || n.nspname ||.|| c.relname || . || a.attname || is ‘‘‘|| col_description(a.attrelid,a.attnum) ||‘‘‘;
FROM pg_class as c
join pg_attribute as a on a.attrelid = c.oid
join pg_namespace n on c.relnamespace=n.oid
where n.nspname = cty_189 and c.relname = jd_template  and a.attnum>0 and col_description(a.attrelid,a.attnum) is not null
order by attnum ;

 

查询字段描述sql-postgresql

标签:pos   col   blog   sel   mes   name   rip   oid   post   

原文地址:http://www.cnblogs.com/luolizhi/p/7560393.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!