postgresql如何查询所有表信息

374次阅读
没有评论

postgresql如何查询所有表信息

获取当前db中所有的表信息:

select * from pg_tables;

用户自定义的表,如果未经特殊处理,默认都是放在名为public的schema下

select tablename from pg_tables where schemaname='public'
postgres=# select tablename from pg_tables where schemaname='public';
 tablename
-----------
 tb_test
(1 行记录)

推荐:PostgreSQL教程

神龙|纯净稳定代理IP免费测试>>>>>>>>天启|企业级代理IP免费测试>>>>>>>>IPIPGO|全球住宅代理IP免费测试

相关文章:

版权声明:postgresql2022-12-02发表,共计274字。
新手QQ群:570568346,欢迎进群讨论 Python51学习