PostgreSQL:在 PostgreSQL 中显示表 [英] PostgreSQL: Show tables in PostgreSQL
本文介绍了PostgreSQL:在 PostgreSQL 中显示表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
PostgreSQL 中 show tables
(来自 MySQL)的等价物是什么?
What's the equivalent to show tables
(from MySQL) in PostgreSQL?
推荐答案
来自 psql
命令行界面,
首先,选择您的数据库
\c database_name
然后,这将显示当前架构中的所有表:
Then, this shows all tables in the current schema:
\dt
<小时>
以编程方式(当然也可以从 psql
界面):
SELECT * FROM pg_catalog.pg_tables;
系统表位于 pg_catalog
数据库中.
The system tables live in the pg_catalog
database.
这篇关于PostgreSQL:在 PostgreSQL 中显示表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文