連線到 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)

更新時間:2020-02-13

126 次瀏覽

開啟你的 職業生涯

完成課程認證

開始吧
廣告
© . All rights reserved.