hello every body.
I have a question about declaring variable in sql server 2012.
when i declare a variable for example :
DECLARE @X INT;
when i compile this line it's true
but when i set a value in different line to this variable:
SET @X =12;
it returns an error message as:
Must declare the scalar variable @X
how can i fix it?