SELECT
TABLE_SCHEMA AS "数据库",
sum( table_rows ) AS "记录数",
concat( TRUNCATE ( sum( data_length ) / 1024 / 1024, 2 ), ' MB' ) / 1024 AS "数据容量(GB)",
concat( TRUNCATE ( sum( index_length ) / 1024 / 1024, 2 ), 'MB' ) / 1024 AS "索引容量(GB)"
FROM
information_schema.TABLES
WHERE
table_schema = 'water_affairs';
正在学习Go语言的PHP程序员。