This question already has answers here:
What does the “@” symbol do in SQL?
                                
                                    (7个答案)
                                
                        
                                5年前关闭。
            
                    
存储过程中的某些字段在其前面带有“ @”符号。这是什么意思?

忽略字段和数据本身。

, cast(hi.date_closed as date) hiclose
, @helloclose:=cast(ifnull(audit.date_created,hello.date_entered)
, cast(@hi-INTERVAL WEEKDAY(@hiclose)DAY as datetime) himonclose
, @oppentered:=cast(opp.date_entered - interval 5 hour as datetime) hicreate
, cast(@oppentered - INTERVAL WEEKDAY(@oppentered)DAY as datetime) himoncreate

最佳答案

@符号表示它是通过参数传递的变量。

谷歌:

What does the "@" symbol do in SQL?

关于mysql - 在SQL存储过程中,“@”是什么意思? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22181580/

10-16 15:15