我在将一张表中的数据进行了统计,现在想将统计的信息插入另一张表,怎么写sql呀,谢谢各位帮忙.
select place_code,status,count(*) num from aaa
where mon = 200705
group by place_code,status
现在想将这个统计出来的信息插入另一张表中.
------解决方案--------------------
select place_code,status,count(*) num into 新表名
from aaa
where mon = 200705
group by place_code,status
----
insert 新表名(place_code,status,num )
select place_code,status,count(*) num
from aaa
where mon = 200705
group by place_code,status