//show tables index, unique
SHOW INDEX FROM [table];
//show table sehema
SHOW COLUMNS FROM [table];
// show foreign
SELECT
ke.referenced_table_name parent,
ke.table_name child,
ke.constraint_name
FROM
information_schema.KEY_COLUMN_USAGE ke
WHERE
ke.referenced_table_name IS NOT NULL;
沒有留言:
張貼留言