来源:自学PHP网 时间:2015-04-16 10:51 作者: 阅读:次
[导读] MYSQL指定数据库查询所有表行数[sql] SELECT CONCAT( 39;union all select 39; 39; 39;, TABLE_SCHEMA , 39; 39; 39; as db , 39; 39; 39;,TABLE_NAME, 39; 39; 39; as tbname,...
MYSQL指定数据库查询所有表行数
[sql] SELECT CONCAT('union all select ''', TABLE_SCHEMA ,''' as db ,''',TABLE_NAME,''' as tbname, count(1) as rows from ', TABLE_SCHEMA ,'.',TABLE_NAME ) AS SqlExe FROM information_schema.TABLES AS t WHERE t.TABLE_TYPE = 'BASE TABLE' AND t.TABLE_SCHEMA = 'AdDataCenter'
-- 因为直接访问视图时,mysql数据统计不精确。
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com