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

MySQLMySQLi Database

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)
raja
Published on 20-Feb-2018 13:56:49
Advertisements