INFORMATION_SCHEMA views

INFORMATION_SCHEMA provides access to metadata about the MySQL server, including information such as database and table names, column data types, and user access privileges.

The following MySQL INFORMATION_SCHEMA views can be accessed using the ODBC driver.

Schema information

View Description
CHARACTER_SETS Lists available character sets and attributes.
COLLATIONS Lists collations and related character sets supported by the server.
SCHEMATA Provides information about databases (schemas) accessible to the current user.

Tables and columns

View Description
COLUMNS Provides information about columns in tables and views.
STATISTICS Provides information about table indexes and related statistics.
TABLES Provides information about tables and views in databases accessible to the current user.

Constraints

View Description
KEY_COLUMN_USAGE Lists key columns used in constraints.
REFERENTIAL_CONSTRAINTS Provides information about foreign key relationships.
TABLE_CONSTRAINTS Lists table constraints (PRIMARY KEY, UNIQUE, or FOREIGN KEY).

Routines and triggers

View Description
EVENTS Lists scheduled events managed by the Event Manager.
ROUTINES Lists stored procedures and functions.
TRIGGERS Lists triggers defined in the database.

Privileges

View Description
COLUMN_PRIVILEGES Lists column-level privileges.
SCHEMA_PRIVILEGES Lists schema-level privileges.
TABLE_PRIVILEGES Lists table-level privileges.
USER_PRIVILEGES Lists global privileges granted to users.