postgresql获取所有表名、字段名、字段类型、注释

更新时间:2023-06-12 00:08:03 阅读: 评论:0

展望未来postgresql获取所有表名、字段名、字段类型、注释大于等于
获取表名及注释:章节的英文>tin man>a aixxx net
adver
lect relname as tabname,cast(obj_description(relfilenode,'pg_class') as varchar) as comment from pg_class c
where  relkind = 'r' and relname not like 'pg_%' and relname not like 'sql_%' order by relname
过滤掉分表:
耶鲁大学心理学导论加条件 and relchecks=0 即可
获取字段名、类型、注释、是否为空:
pha是什么意思
canton fairSELECT col_description(a.attrelid,a.attnum) as comment,format_type(a.atttypid,a.atttypmod) as type,a.attname as name, a.attnotnull as notnull
小屁孩日记电影
FROM pg_class as c,pg_attribute as a lname = '表名' and a.attrelid = c.oid and a.attnum>0

本文发布于:2023-06-12 00:08:03,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/78/933256.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:注释   类型   获取   字段名   条件   过滤   电影   心理学
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图