If we are comparing two NULL values against the Equal or NOT Equal operators, what will be the ouput?
what will be the output for below code?
declare @v2 varchar(10);
declare @v1 varchar(10);
IF @v1 = @v2
Print 'EQUAL';
else if @v1 != @v2
Print ' NOT EQUAL';
else
Print ' Neither EQUAL nor NOT EQUAL';
Comparison against NULL values will results NULL, but not the TRUE/FALSE..
So the output of the above code will be '
Neither EQUAL nor NOT EQUAL'