How can I check the tables of databases other than current database?


With the help of following MySQL command, we can check the tables of a database other than the database we are currently using −

Show Tables from Database_name;

For example, the following query would display the list of tables from a database named ‘gaurav’ when currently we are using a database named ‘new’ −

mysql> use new;
Database changed

mysql> show tables from gaurav;
+--------------------+
| Tables_in_tutorial |
+--------------------+
| testing            |
| employee           |
| tender             |
| Ratelist           |
+--------------------+
4 rows in set (0.00 sec)

Updated on: 22-Jun-2020

66 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements