2012年4月13日
摘要: if Object_id('tb1') is not null Drop table tb1;gocreate table tb1(date int primary key, sale int);goinsert into tb1(date, sale)select 1, 20 union allselect 2, 15 union allselect 3, 14 union all select 4, 18 union all select 5, 30;select * from tb1;--方法一,单个聚合select date, sale, (select sum(sal 阅读全文
posted @ 2012-04-13 10:19 唐朝t 阅读(2740) 评论(0) 推荐(0) 编辑