Check out example codes for "how to declare a variable in sql". It will help you in understanding the concepts better.

Code Example 1

-- Declare the variable to be used.
DECLARE @MyCounter int;

-- Initialize the variable.
SET @MyCounter = 0;

Code Example 2

DECLARE @COURSE_ID AS INT, @COURSE_NAME VARCHAR (10);

Learn ReactJs, React Native from akashmittal.com