Using metadata example:
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'db_name' AND TABLE_NAME = 'table_name';
SHOW TABLES FROM db_name LIKE '%aaa%'; (no WHERE)
SHOW CREATE TABLE table_name;
* Display the CREATE TABLE statement including its indexes.
DESCRIBE table_name;
SHOW COLUMNS FROM table_name;
SHOW FIELDS FROM table_name;
SHOW INDEX FROM table_name;
* If the index is PK only and the PK consists of 2 columns, the output is 2 rows.
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'db_name' AND TABLE_NAME = 'table_name';
SHOW TABLES FROM db_name LIKE '%aaa%'; (no WHERE)
SHOW CREATE TABLE table_name;
* Display the CREATE TABLE statement including its indexes.
DESCRIBE table_name;
SHOW COLUMNS FROM table_name;
SHOW FIELDS FROM table_name;
SHOW INDEX FROM table_name;
* If the index is PK only and the PK consists of 2 columns, the output is 2 rows.