- 查询mysql所有数据库
show databases;
- 查询mysql数据库下的表及相关中文注释等信息
select table_name from information_schema.tables where table_schema='information_schema' ;
--或者
show tables;
- 查询mysql表有哪些字段,字段类型,中文注释等信息
select * from information_schema.columns where table_schema='库名' and table_name='表名';
- 查询mysql表的前几行
select * from 表名 limit 10;