Answer: We can also Convert Integer value to Varchar with the help of Convert function.
For Example:-
Declare @Id Int = 123;
Select Convert(Varchar,@Id) as Id;
//OR
Select Convert(Varchar(3),@Id) as Id;
Output will be 123 for both queries.
Asked In: Many Interviews |
Alert Moderator