select s1.emp_no,s1.salary, (@sum_:=@sum_+s1.salary) as running_total from salaries s1,( SELECT @sum_:= 0) AS t where s1.to_date = '9999-01-01' order by s1.emp_no 为什么这个通过不了呢?running_total无法取整,奇怪了