当然不正确了,加上Where精确到一条记录才行,你这个

解决方案 »

  1.   

    你这个是检索所有的数据,如果是select sum(table.maney):into tmp from table
    select maney:into tmp from table where key=:tmp2就行了
      

  2.   

    select table.money into :tmp from table  只是表示一下,其实是有where参数的.
    我想知道的是变量的表示方法. 因为 
    select maney:into tmp from table where key=:tmp2 也不对.注意.不是在mysql 里面写.是在c 代码里面写.
      

  3.   

    TO ghost_old(PB初级程序员),此人好象什么都不懂,什么都要问... 此物居心不良,请大家不要再告诉它`~~
      

  4.   

    mysql用户变量一般只保存一个变量,不能保存记录集