navicat脚本查询整库表名及其注释

select t.table_name, obj_description(c.oid) as table_comment

from

information_schema.tables t

left join pg_class c on t.table_name::text = c.relname

where t.table_chema = 'public' and t.table_type = 'BASE TABLE' and t.table_name not like '' order by t.table_name

posted on 2024-08-05 16:34  黑子菜园  阅读(71)  评论(0编辑  收藏  举报

导航