select 字段一+字段二 ad 字段三 from 表

解决方案 »

  1.   

    更正:select 字段一+字段二 as 字段三 from 表
      

  2.   

    select 字段一+字段二 别名 from 表
      

  3.   

    上面两位误会我的意思了,比如有一个表
      销售单号 金额
       0001   100
       0002   200
       0003   300
    我要得到表的详细记录和金额的总数,目前我的方法是先Select sum(金额) as temp1 from table,open以后将temp1字段的值赋给变量1,再select * from table 然后open
    有没有一次可以得到的方法
      

  4.   

    select * from table 
    union all
    Select '和',sum(金额) from table
      

  5.   

    To: pengdali(大力) 
      请你解释一下,谢谢
      

  6.   

    Select 金额=sum(金额) from table
    然后获得返回记录集的值就可以了