复制代码
1
2
3
4
5
6
7
8SELECT tbl.tablename AS 表名, a.attnum AS 字段顺序, a.attname AS 字段名, pg_type.typname AS 字段类型, col_description(a.attrelid, a.attnum) AS 注释, case a.attnotnull when 'f' then '否' when 't' then '是' end AS 是否必填 FROM pg_tables tbl, pg_class c, pg_attribute a, pg_type WHERE tbl.schemaname = 'wirelessresource' AND pg_type.oid = a.atttypid AND tbl.tablename = c.relname AND a.attrelid = c.oid AND a.attnum > 0 ORDER BY tbl.tablename, a.attnum;
在navicat中可以直接导出结果为excel格式
最后
以上就是还单身保温杯最近收集整理的关于postgresql 反向生成数据字典的全部内容,更多相关postgresql内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复