标签:
insert into month_gpcj_info(idStr,zszrmygpsl,xyzrmygpsl,mycje,mycjl,month_date,dataCompiledDate) select UUID() idstr, max(m.GPGSZSZhuanRangShu) zszrmygpsl,max(m.GPGSXYZhuanRangShu) xyzrmygpsl, sum(m.CJHeJiJinE) mycje,sum(m.RJCJGPHeJi) mycjl ,‘201501‘ month_date,‘2015-09-01‘ dataCompiledDate from market_scope_statistics m where m.dataCompiledDate like ‘2015-01-%‘;
sql insert into select语句写法-将查询结果直接插入到表中
标签:
原文地址:http://www.cnblogs.com/hwaggLee/p/4775778.html