select sum(price) from……

解决方案 »

  1.   

    select sum(price) 
    from aaa.db 
    where condition
      

  2.   

    select sum(price)
    from aaa
    where condition
    having 
    你去查查SQL的帮助
      

  3.   

    select id, price from aaa.db
    union
    select @@RowCount +1 ,sum(price) from aaa.db
    这样写就可以的,最后一行是合计行
      

  4.   


    Select Sum(Price) 
    From  aaa 
    Where ...
    Having ...
      

  5.   


    Select Sum(Price) 
    From  aaa 
    Where RecordNum Between 1 and 100
    Order by RecordNum ...