This blog article shows you how to declare a variable and assign a value to it in MySQL. In Microsoft SQL to declare a variable and assign a value to it you do the following.
Declare @dt datetime
SELECT @dt = DATEADD(MONTH,-2, GETDATE());
SELECT @dt
Unfortunately, I cannot find a way to declare a variable with specific data type in MySQL. I can only do the following.
SELECT @var_first := DATE_SUB(CURDATE(), INTERVAL 2 MONTH);
Also: Sql Server Generate Create Table Script Using Tsql
It looks convenient but you will not know the data type of the variable @var_first.