显示所有数据库名称 [英] Display all database names

查看:52
本文介绍了显示所有数据库名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用主机地址和端口显示所有数据库名称?像 SELECT current_database() 显示当前连接的数据库.我需要显示所有数据库名称.提前致谢.

is there any way to display all database names using the host address and port? Like SELECT current_database() which shows currently connected db. I need to display all database names. Thanks in advance.

推荐答案

有一个表格可以显示所有数据库:

There is a table which shows all databases:

SELECT * FROM pg_database;

这篇关于显示所有数据库名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆