MENU
INFORMATION SCHEMA
INFORMATION_SCHEMA is a predefined database which stores meta-information about all the other databases. It contains several read-only views. They are not tables, so there are no files associated with them, and you cannot set triggers on them. However, you can select INFORMATION_SCHEMA as the default database with a USE statement.SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'db_name' [AND table_name LIKE 'wild'] |
SHOW TABLES FROM db_name [LIKE 'wild'] |
Much information in INFORMATION_SCHEMA can be retrieved with the SHOW statement. For instance, the two statements below are equivalent:
INFORMATION_SCHEMA contains the following tables:
CHARACTER_SETS
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
COLUMNS
COLUMN_PRIVILEGES
ENGINES
EVENTS
FILES
GLOBAL_STATUS and SESSION_STATUS
GLOBAL_VARIABLES and SESSION_VARIABLES
KEY_COLUMN_USAGE
OPTIMIZER_TRACE
PARAMETERS
PARTITIONS
PLUGINS
PROCESSLIST
PROFILING
REFERENTIAL_CONSTRAINTS
ROUTINES
SCHEMATA
SCHEMA_PRIVILEGES
STATISTICS
TABLES
TABLESPACES
TABLE_CONSTRAINTS
TABLE_PRIVILEGES
TRIGGERS Table
USER_PRIVILEGES
VIEWS