品易云推流 关闭
文章详情页
文章 > PostgreSQL > postgresql 如何查看有哪些表

postgresql 如何查看有哪些表

头像

爱喝马黛茶的安东尼

2019-12-17 15:04:012757浏览 · 0收藏 · 0评论

postgresql中可以用\d命令列出当前数据库中的所有表,例如:

# \d (列出当前数据库中的所有表),示例结果:

Schema   |  Name   | Type  |  Owner  
public  | company   | table | postgres
public  | department | table | postgres

\d tablename 可以查看具体表格信息,例如:

#\d  company (列出当前数据库中的company 表),示例结果:

Column  |     Type     | Collation | Nullable 
id     |       integer    |       | not null  
name   |        text     |       | not null 
age    |       integer    |        | not null

6dfe4aed0de06e09577c745b7773b33.png

Python学习网,大量的免费PostgreSQL入门教程,欢迎在线学习!

关注

关注公众号,随时随地在线学习

本教程部分素材来源于网络,版权问题联系站长!

底部广告图