Slide 70
Slide 70 text
TABLE SHOW CREATE TABLE
INDEX
SELECT INDEX_NAME, GROUP_CONCAT(COLUMN_NAME ORDER BY SEQ_IN_INDEX),
MAX(INDEX_TYPE) columns, MAX(NON_UNIQUE) FROM statistics WHERE TABLE_SCHEMA=?
AND TABLE_NAME=? GROUP BY INDEX_NAME
PARTITION
SELECT CONCAT(PARTITION_NAME,':',IFNULL(SUBPARTITION_NAME,'none')),
PARTITION_NAME, IFNULL(SUBPARTITION_NAME,’none’), IFNULL(PARTITION_METHOD,'none’),
UPPER(IFNULL(PARTITION_EXPRESSION,'none’)) FROM partitions WHERE table_schema=? and
table_name=? and PARTITION_NAME is not null
COLUMN
SELECT COLUMN_NAME, IFNULL(COLUMN_DEFAULT,'no_defaults'), IS_NULLABLE,
IFNULL(CHARACTER_SET_NAME,'none'), IFNULL(COLLATION_NAME,'none'), DATA_TYPE,
ORDINAL_POSITION, IFNULL(CHARACTER_MAXIMUM_LENGTH,0) FROM COLUMNS WHERE
TABLE_SCHEMA=? AND TABLE_NAME=? ORDER BY ORDINAL_POSITION
FOREIGN KEY
SELECT CONSTRAINT_NAME, CONSTRAINT_TYPE FROM TABLE_CONSTRAINTS WHERE
TABLE_SCHEMA=? AND TABLE_NAME=?
Metadata Check
About Table