关于MYSQL查总记录条数的问题
有分组查询的同时用select count(*) from … group by ..是查不出总记录条数的。在ORACLE中有over()函数可以实现,不知道各位大侠有没有遇到过这样的问题
set names gbk;
create temporary table tmp_test(counter int(11));
insert into tmp_test select count(*) from ecs_attribute where 1=1 group by attr_id;
select count(*) from tmp_test;
ecs_attribute表名
WITH ROLLUP