CAST( ) function is used to convert a data type varible or data from one data type to another data type
below is the example for Converting a varchar data type to int data type using CAST( ) function
declare @a varchar(2)
declare @b varchar(2)
set @a=10
set @b=20
Select CAST(@a as int) + CAST(@b as int) as Result
OutPut:-
Result 30