PostgreSQL: Show tables in PostgreSQL

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

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

24条回答
  •  北海茫月
    2020-11-28 17:32

    The most straightforward way to list all tables at command line is, for my taste :

    psql -a -U  -p  -h  -c "\dt"
    

    For a given database just add the database name :

    psql -a -U  -p  -h  -c "\dt" 
    

    It works on both Linux and Windows.

提交回复
热议问题