首页  >  文章  >  数据库  >  连接到一个MySQL数据库时,如何查看其他MySQL数据库的表列表?

连接到一个MySQL数据库时,如何查看其他MySQL数据库的表列表?

王林
王林转载
2023-09-15 22:49:06941浏览

连接到一个MySQL数据库时,如何查看其他MySQL数据库的表列表?

借助SHOW TABLES From Database_name查询,我们可以看到另一个数据库的表。这里Database_name是我们当前没有使用的数据库的名称。考虑以下示例,其中我们运行查询以获取数据库名称“tutorial”中的表列表。

mysql> show tables from tutorial;
+--------------------+
| Tables_in_tutorial |
+--------------------+
| employee           |
| showzerofill       |
| student            |
+--------------------+
3 rows in set (0.00 sec)

以上是连接到一个MySQL数据库时,如何查看其他MySQL数据库的表列表?的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文转载于:tutorialspoint.com。如有侵权,请联系admin@php.cn删除