postgresql查看有哪些表的方法

  介绍

这篇文章将为大家详细讲解有关postgresql查看有哪些表的方法,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

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

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

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

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

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

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

 postgresql查看有哪些表的方法

关于postgresql查看有哪些表的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看的到。

postgresql查看有哪些表的方法