我有这样一个表t
其中有这样一个字段fyhj
fyhj
12.33
45.12
求一sql语句能求出所有费用的总和
谢谢

解决方案 »

  1.   

    select sum(fyhj) from t
      

  2.   

    select sum(fyhj) from t
      

  3.   


    select sum(fyhj) as fyhj
    from table
      

  4.   

    select sum(fyhj) from t
      

  5.   

    select sum(fyhj) from t
    这就一个简单的聚合函数,兄弟,回去好好看一下。还有count、group by、computer by
      

  6.   

    select sum(cast(fyhj as decimal(4,2))) from t 
      

  7.   

    select sum(cast(fyhj as decimal(4,2))) from t 
    兄弟,你要的是这个吗?
      

  8.   

    select sum(fyhj) from t
      

  9.   

    select sum(fyhj) from t