在連線到一個 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)
廣告