linliquan

 

1.查询某个数据库下有多少张表

SELECT COUNT(*) TABLES FROM information_schema.TABLES WHERE table_schema = \'替换成你的数据库名\';

 

2.查询某个数据库下每个表有多少条数据

select TABLE_NAME, concat(truncate(data_length/1024/1024,2),\' MB\') as data_size,table_rows
from information_schema.tables where TABLE_SCHEMA = \'替换成你的数据库名\';

分类:

技术点:

相关文章:

  • 2021-10-19
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案