The INFORMATION_SCHEMA.SCHEMATA Table : INFORMATION_SCHEMA : Data Dictionary MySQL TUTORIALS


MySQL TUTORIALS » Data Dictionary » INFORMATION_SCHEMA »

 

The INFORMATION_SCHEMA.SCHEMATA Table


A schema is a database, so the SCHEMATA table provides information about databases.

mysql> desc INFORMATION_SCHEMA.SCHEMATA;
+----------------------------+--------------+------+-----+---------+-------+
| Field                      | Type         | Null | Key | Default | Extra |
+----------------------------+--------------+------+-----+---------+-------+
| CATALOG_NAME               | varchar(512| YES  |     | NULL    |       |
| SCHEMA_NAME                | varchar(64)  | NO   |     |         |       |
| DEFAULT_CHARACTER_SET_NAME | varchar(64)  | NO   |     |         |       |
| DEFAULT_COLLATION_NAME     | varchar(64)  | NO   |     |         |       |
| SQL_PATH                   | varchar(512| YES  |     | NULL    |       |
+----------------------------+--------------+------+-----+---------+-------+
rows in set (0.00 sec)

The following statements are equivalent:

SELECT SCHEMA_NAME AS `Database`
  FROM INFORMATION_SCHEMA.SCHEMATA
  [WHERE SCHEMA_NAME LIKE 'wild']

SHOW DATABASES
  [LIKE 'wild']



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Data Dictionary
» INFORMATION_SCHEMA