What is the synonym statement of SHOW DATABASES with the help of which we can see the list of MySQL databases?


As we know that with the help of SHOW DATABASES statement we can see the list of MySQL databases. Similarly, we can use SHOW SCHEMAS as the synonym of SHOW DATABASES to get the list of databases.

Example

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| gaurav             |
| mysql              |
| performance_schema |
| query              |
| query1             |
| sys                |
| tutorials          |
+--------------------+
8 rows in set (0.07 sec)

mysql> SHOW SCHEMAS;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| gaurav             |
| mysql              |
| performance_schema |
| query              |
| query1             |
| sys                |
| tutorials          |
+--------------------+
8 rows in set (0.00 sec)

Updated on: 10-Feb-2020

55 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements