本文介绍了在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界面):


Programmatically (or from the psql interface too, of course):

SELECT * FROM pg_catalog.pg_tables;

系统表位于pg_catalog数据库中.

这篇关于在PostgreSQL中显示表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 04:49