MySql "SHOW DATABASES" query syntax with example

In this article we will see "How to show all Databases in MySql" and "MySql SHOW DATABASES query syntax with example".

"SHOW DATABASES" query syntax

"SHOW DATABASES" is used to show all databases in MySql, the syntax is as follow.


SHOW DATABASES;

"SHOW DATABASES" query example

"SHOW DATABASES" is used to show all databases in MySql, as shown in the example below.


SHOW DATABASES;

Output: Output will be something like this:


+--------------------+
| Database           |
+--------------------+
| information_schema |         |
| testDatabase       |
+--------------------+

In this article we have seen"How to show all Databases in MySql", in upcoming articles we will see more about Mysql syntax and queries with example.

About The Author

Nagesh Chauhan

Nagesh Chauhan has 8+ years of software design and development experience in variety of technologies like - Core Java, Java 8 (Streams, Lambda), J2EE (Servlet, JSP), Spring Framework (MVC, IOC, JDBC, SECURITY etc), Spring Boot and Microservices, Kafla, Redis, Cassandra and Spark.