For example:-
declare @a char(4)
set @a='ab'set @a=@a+'c'
print @a
--it gives the output 'ab' but if declare the @a as varchar like
declare @a varchar(4)
set @a='ab'
set @a=@a+'c'
print @a
set @a='ab'
set @a=@a+'c'
print @a
--then it gives the output 'abc'

Ravi KumarPosted Aug 19, 2014, 2:36 AM
check the fallowing
declare @a char(4)
set @a='ab'
set @a=rtrim(@a)+'c'
print @a