• 技术文章 >数据库 >PostgreSQL

    postgresql 如何查看有哪些表

    爱喝马黛茶的安东尼爱喝马黛茶的安东尼2019-12-17 15:04:01原创2364

    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入门教程,欢迎在线学习!

    专题推荐:postgresql 查看 表
    品易云
    上一篇:postgresql oid是什么 下一篇:postgresql如何升级

    相关文章推荐

    • postgresql如何导入数据• postgresql怎么创建表• postgresql怎么解锁表• postgresql oid是什么

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网