查询字段描述sql-postgresql
时间:2021-07-01 10:21:17
帮助过:74人阅读
‘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