If there is any sane reason to ignore trailing blanks in varchar comparisons, why doesn't that apply to tab-characters too ?
On SQL Server I get
SELECT case when '' = ' ' then 'true' else 'false' end, case when '' = CHAR(9) then 'true' else 'false' end
---- ----- true false
Is this a problem of the ANSI specification or a problem of the SQL Server implementation?
I do not have access to the text of the specification. I only see it mentioned in this answer. I can't tell if it addresses only blanks or if it refers to whitespace in some vague sense.