第二种:查询所有数据的大小
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES


第三种:查看指定数据库的大小,比如说:数据库apoyl
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES where table_schema='apoyl';


第四种:查看指定数据库的表的大小,比如说:数据库apoyl 中apoyl_test表
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES where table_schema='apoyl' and table_name='apoyl_test';

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-02-01
  • 2021-12-23
  • 2021-11-29
猜你喜欢
  • 2021-09-07
  • 2021-05-20
  • 2022-01-26
  • 2021-11-21
  • 2021-11-29
相关资源
相似解决方案