PostgreSQL: Show tables in PostgreSQL

后端 未结 24 2657
醉梦人生
醉梦人生 2020-11-28 16:58

What\'s the equivalent to show tables (from MySQL) in PostgreSQL?

24条回答
  •  日久生厌
    2020-11-28 17:31

    Login as superuser:

    sudo -u postgres psql
    

    You can list all databases and users by \l command, (list other commands by \?).

    Now if you want to see other databases you can change user/database by \c command like \c template1, \c postgres postgres and use \d, \dt or \dS to see tables/views/etc.

提交回复
热议问题