Check out example codes for "Assign value to var in SQL". It will help you in understanding the concepts better.

Code Example 1

DECLARE @EmpIDVariable int;
SELECT @EmpIDVariable = MAX(EmployeeID)
FROM HumanResources.Employee;

Learn ReactJs, React Native from akashmittal.com