Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Concatenation with char variable in SQL Server doesn't work?
Rahul Bansal
Aug 19 2014 12:43 AM
773
Reply
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
--then it gives the output 'abc'
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
SQL to JSON
simplify the query or give alternative to the query