Assignment Operators -> 1 mysql>  SELECT 1 XOR 1; -> 0 mysql>  SELECT 1 XOR 0; -> 1 mysql>  SELECT 1 XOR NULL; -> NULL mysql>  SELECT 1 XOR 1 XOR 1; -> 1 mysql>  SELECT @var1, @var2; -> NULL, NULL mysql>  SELECT @var1 := 1, @var2; -> 1, NULL mysql>  SELECT @var1, @var2; -> 1, NULL mysql>  SELECT @var1, @var2 := @var1; -> 1, 1 mysql>  SELECT @var1, @var2; -> 1, 1 Note 12.4.4 Assignment Operators If the  PIPES_AS_CONCAT  SQL mode is enabled,  ||  signifies the SQL-standard string concatenation operator (like  CONCAT() ). The  || , operator is a nonstandard MySQL extension. As of MySQL 8.0.17, this operator is deprecated; expect support for it to be removed in a future version of MySQL. Applications should be adjusted to use the standard SQL  OR  operator. Exception: Deprecation does not apply if  PIPES_AS_CONCAT  is enabled because, in that case,  ||  signifies string concatentation. Logical XOR. Returns  NULL  if either operand is  NULL . For non- NULL  operands, evaluates to  1  if an odd number of operands is nonzero, otherwise  0  is returned. a XOR b  is mathematically equal to  (a AND (NOT b)) OR ((NOT a) and b) . Assignment operator. Causes the user variable on the left hand side of the operator to take on the value to its right. The value on the right hand side may be a literal value, another variable storing a value, or any legal expression that yields a scalar value, including the result of a query (provided that this value is a scalar value). You can perform multiple assignments in the same  SET  statement. You can perform multiple assignments in the same statement. Unlike  = , the  :=  operator is never interpreted as a comparison operator. This means you can use  :=  in any valid SQL statement (not just in  SET  statements) to assign a value to a variable. 2133 • := • XOR Name Description := Assign a value = Assign a value (as part of a  SET  statement, or as part of the  SET  clause in an  UPDATE  statement) Table 12.6 Assignment Operators