当前位置:   article > 正文

人大金仓查询表以及表注释 表字段注释_kingbase查询表注释

kingbase查询表注释
-- 查询表以及表注释
SELECT
  "table_name", t2.description
FROM information_schema.tables
left join (select * from pg_description where objsubid = 0) t2 on table_name::regclass::oid = t2.objoid
WHERE table_schema = 'public' AND table_type = 'BASE TABLE';

-- 查询表字段以及类型注释等
select table_name::regclass::oid, "column_name", data_type,
character_maximum_length, t2.description
from information_schema.COLUMNS t1
left join pg_description t2 on t1.dtd_identifier = t2.objsubid::text and t2.objoid = table_name::regclass::oid
where "table_name" = 'tabl_name';
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/980388
推荐阅读
  

闽ICP备14008679号