i run this query in SQL Server 2008
declare @a varchar(1)
select @a = 22
select @a
it’s return this
*
why this query make this result ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are converting a 2 character number into a 1 character field.
It won’t fit.
SQL is indicating the data is missing. Otherwise, it would display just a
2and you wouldn’t know if this was the full value or not.