SHOW DATABASES //列出 MySQL Server 数据库。 SHOW TABLES [FROM db_name] //列出数据库数据表。 SHOW CREATE TABLES tbl_name //导出数据表结构。 SHOW TABLE STATUS [FROM db_name] //列出数据表及表状态信息。 SHOW COLUMNS FROM tbl_name [FROM db_name] //列出资料表字段 SHOW FIELDS FROM tbl_name [FROM db_name],DESCRIBE tbl_name [col_name]。 SHOW FULL COLUMNS FROM tbl_name [FROM db_name]//列出字段及详情 SHOW FULL FIELDS FROM tbl_name [FROM db_name] //列出字段完整属性 SHOW INDEX FROM tbl_name [FROM db_name] //列出表索引。 SHOW STATUS //列出 DB Server 状态。 SHOW VARIABLES //列出 MySQL 系统环境变量。 SHOW PROCESSLIST //列出执行命令。 SHOW GRANTS FOR user //列出某用户权限
1 2 3 4 5 6 7 8 9 10 11 12 13 14
SHOW DATABASES SHOW TABLES FROM DB_NAME
SHOW COLUMNS FROM select * from information_schema.columns where table_schema='DB_NAME'
select table_name,column_name,collation_name,character_set_name from information_schema.columns where table_schema='DB_NAME' select table_name,column_name,column_name,collation_name,character_set_name from information_schema.columns where table_schema='DB_NAME' and column_name like '%description' select * from information_schema.columns where table_schema='DB_NAME' and column_name like '%description'
select table_name,column_name,collation_name,character_set_name from information_schema.columns where table_schema='DB_NAME' and COLUMN_NAME like '%a%'