Transact-SQL: Compare strings in SQL and spaces
Just a quick reminder/note. What will be the result for below string comparision? What do you think?
IF (' ' <> '')
print 'different'
ELSE
print 'equal'
If you answered ‘different’ then you are wrong :) The result will be ‘equal’. Why?
Because SQL ignores trailing spaces when comparing strings.

(535)

