Check out example codes for "how to put value in variable mysql". It will help you in understanding the concepts better.

Code Example 1

-- MySQL

SET @variable_name := value;

Code Example 2

SET variable = (SELECT SUM(tax) FROM taxable_transactions);

Learn ReactJs, React Native from akashmittal.com