第1条没看懂。
第2条,replace(a," ","")试试。

解决方案 »

  1.   

    2、
    select replace(a,' ','') from t2
      

  2.   

    2、
    select replace(a,' ','') from t2
      

  3.   

    2、
    select replace(a,' ','') from t2
      

  4.   

    不好意思,表达不清楚。
    第一条:我是想把当a=2时,将a=1那一行的b列加上a=2那一行的b列,将a=1那一行的c列减去a=2那一行的c列,然后删去a=2那一行。
      

  5.   

    select aa.a,(case when aa.a=1 then aa.b+bb.b else aa.b end) as b
           (case when aa.a=1 then aa.c-bb.c else aa.c end) as c
    from (selec * from tt2 where a<>2) aa 
          ,(select b,c from t2 where a=2) bb