SHOW DATABASES

Description

SHOW DATABASES lists the databases on the MatrixOne. SHOW SCHEMAS is a synonym for SHOW DATABASES. The LIKE clause, if present, indicates which database names to match. The WHERE clause can be given to select rows using more general conditions.

MatrixOne implements databases as directories in the data directory, so this statement simply lists directories in that location.

Database information is also available from the INFORMATION_SCHEMA SCHEMATA table.

Syntax

  1. > SHOW {DATABASES | SCHEMAS}
  2. [LIKE 'pattern' | WHERE expr]

Examples

  1. create database demo_1;
  2. mysql> show databases;
  3. +--------------------+
  4. | Database |
  5. +--------------------+
  6. | mo_task |
  7. | information_schema |
  8. | mysql |
  9. | system_metrics |
  10. | system |
  11. | demo_1 |
  12. | mo_catalog |
  13. +--------------------+
  14. 7 rows in set (0.00 sec)