
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Which MySQL query can be used with the help of which we can see the list of MySQL databases?
With the help of following MySQL query, we can see the list of MySQL database −
mysql> SELECT schema_name FROM information_schema.schemata; +--------------------+ | schema_name | +--------------------+ | information_schema | | gaurav | | mysql | | performance_schema | | query | | query1 | | sys | | tutorials | +--------------------+ 8 rows in set (0.00 sec)
We can also use WHERE clause with this query as follows −
mysql> SELECT schema_name FROM information_schema.schemata WHERE schema_name LIKE '%schema' OR schema_name LIKE '%s'; +--------------------+ | schema_name | +--------------------+ | information_schema | | performance_schema | | sys | | tutorials | +--------------------+ 4 rows in set (0.00 sec)
- Related Articles
- What is the synonym statement of SHOW DATABASES with the help of which we can see the list of MySQL databases?
- How can we see MySQL temporary tables in the list of tables?
- How can we write MySQL query for inner joins with the help of Comma operator?
- How can we write MySQL query for inner joins with the help of keyword JOIN?
- How can we write MySQL query for cross joins with the help of Comma operator?
- How can we write MySQL query for cross joins with the help of keyword JOIN?
- How can we get the list of MySQL server-side help categories?
- How can we display a list of currently existing MySQL databases on the server?
- How can we filter data with the help of MySQL subquery?
- How can we see the list of views stored in a particular MySQL database?
- How MySQL LEFT JOIN can be used to simulate the MySQL MINUS query?
- Which MySQL function can be used to append values of a column with single quotes?
- Which MySQL function can be used to find out the length of the string in bits?
- How can we see only the list of stored procedures in a particular MySQL database?
- How can we see only the list of stored functions in a particular MySQL database?

Advertisements