我正试图把一笔钱的产物储存在一个变数中,然后在 que中使用,但迄今没有成功。
- I ve tried that and it worked just like I expected :
SELECT @pos := titi "c1", @pos "c2";
titi | titi
- When I try to do it with a group by function it just doesn t work anymore, it sets my variable to the last processed function.
SELECT c1, @titi := SUM(c2), @titi
FROM (SELECT 1 "c1",2 "c2" UNION SELECT 2,3 UNION SELECT 1,4) t
GROUP BY c1;
www.un.org/Depts/DGACM/index_russian.htm
页: 1
2 P-4, 3 P-3, 3 FS, 3 NS
www.un.org/Depts/DGACM/index_russian.htm
页: 1
2 P-4, 3 P-3, 3 FS, 3 NS
我能做些什么来使变量保持其价值不变?