MySQL 工作小记
申明:用于日常工作中经常用到的东西,记录一下便于查询
1、查询一个库中最大的5张表
- SELECT concat(table_schema,'.',table_name) table_name, concat(round(data_length/(1024*1024),2),'M') data_length FROM information_schema.TABLES ORDER BY data_length DESC LIMIT 5;
2、查询触发器 【由于有正式数据,所以截图中加了explain】
- SELECT * FROM information_schema.`TRIGGERS`;
3、查询自定义函数
- select * from mysql.func;