To list the tables in the current database, you can run the \dt
command, in psql
:
要列出当前数据库中的表,可以在psql
运行\dt
命令:
If you want to perform an SQL query instead, run this:
如果要执行SQL查询,请运行以下命令:
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
ORDER BY table_name;
翻译自: https://flaviocopes.com/postgres-how-to-list-tables-database/