mysql set variable in a session code example Example: mysql set variable in a session mysql>SET @max_limbs = (SELECT MAX(arms+legs) FROM limbs);