mysql 查询

mysql表结构相关查询

表的大小

	select TABLE_name,concat(truncate(sum(data_length)/1024/1024,2),'MB') as data_size,
     concat(truncate(sum(max_data_length)/1024/1024,2),'MB') as max_data_size,
     concat(truncate(sum(data_free)/1024/1024,2),'MB') as data_free,
     concat(truncate(sum(index_length)/1024/1024,2),'MB') as index_size
     from information_schema.tables where TABLE_SCHEMA = 'database_name' GROUP BY table_name ;
上一篇:如何在Linux中使用 Truncate 命令


下一篇:PLSQL_Oracle Exception异常分类、异常抛出、异常处理、异常传播(概念)