呵呵那你将得到的sum值转换成数值型的加到一起不就行了啊。

解决方案 »

  1.   

    你where条件都是一样得
    sql="";
    sql+=...;
    sql+=........;
      

  2.   

    如果条件一样sql2 和sql3可以写到一起。
    select sum(a1)as a1, sum(a2)as a2 from ** where *****
    sql1就是一个数据集了.
      

  3.   

    select * from table1 UNION select * from table2
    ??????????????????
      

  4.   

    以前好像有人问过.这里有个例子.select套 select 随便怎么折腾都可以^^v
    select a.projectID,a.createTime,a.projectState,a.principal,
    lastOnlineTime=(select max(b.updateTime)
    from OnlineRecordTable as b
    where b.projectID=a.projectID),        lastBugTime=(select max(c.revealTime)
    from BugRecordTable as c
    where c.projectID=a.projectID)from BaseInfoTable as a
    where a.projectID=2