I want to cast, say a character variable to an integer, within a stored procedure.
Assuming var1 is an Integer variable and var2 is a character variable
I can write
SET var1 = CAST(var2 as INT);
I can get the same effect by
SET var1 = INTEGER(var2);
Does it matter which of the two approaches I choose as far as performance is concerned? Are there any merits or demerits associated with each of the approaches?What is the recommended approach in such situations?