USE OF VARIABLES IN MYSQL

VARIABLES :

User-defined variables are connection-specific. That is, a user variable defined by one client cannot be seen or used by other clients. All variables for a given client connection are automatically freed when that client exits.

Syntax User variables are written as @var_name
SET @var_name = expr [, @var_name = expr] ...
For SET, either = or := can be used as the assignment operator.
example 1:
SET @t1=1, @t2=2, @t3:=4;
SELECT @t4 := @t1+@t2+@t3;