这家伙很懒。。。
分类: Mysql/postgreSQL
2013-11-19 15:51:52
点击(此处)折叠或打开
lijunwyf212016-06-29 20:27:00
use information_schema;SET group_concat_max_len = 100000;
SELECT concat(\'select tn,ct from (\',substring(a.ss,1, locate(\', count(*)\',a.ss)-1),\' as tn, count(*) as ct\',substring(a.ss, locate(\', count(*)\',a.ss)+10,LENGTH(a.ss)-locate(\', count(*)\',a.ss)-19) ,\') t ORDER BY t.ct desc;\' ) INTO @str from
(select GROUP_CONCAT(t.qs SEPARATOR \' \\n\') ss from(select concat(\'select&nb