select name, int1=sum(int1), int2=sum(int2) from tb group by name
select name,sum(int1) as int1,sum(int2) as int2 from tab1 group by name
copy-- select name,sum(int1) as int1,sum(int2) as int2 from tab1 group by name copy-- select name, int1=sum(int1), int2=sum(int2) from tb group by name 我抄袭两个人的!!!呵呵!!!
from tb
group by name
select name,sum(int1) as int1,sum(int2) as int2 from tab1 group by name
copy--
select name, int1=sum(int1), int2=sum(int2)
from tb
group by name
我抄袭两个人的!!!呵呵!!!