Subject | Re: [firebird-support] Select on varchar with spaces |
---|---|
Author | Ann W. Harrison |
Post date | 2005-06-27T21:33:39Z |
Daniel Rail wrote:
equality operations between strings (either CHAR or VARCHAR) ignore
trailing blanks.
Thus a CHAR(1) 'A' = CHAR(3) 'A ' = VARCHAR (54) 'A'
has nothing to do with variability. And has been that way since 1989.
Also since then, LIKE behaves differently.
Regards,
Ann
>Actually, that's not quite correct. The SQL Standard states that
>
> SQL Standard, for quite a number of years(maybe over 10-15 years). The
> trailing blanks in a VARCHAR are stripped when using the "="
> comparison.
>
equality operations between strings (either CHAR or VARCHAR) ignore
trailing blanks.
Thus a CHAR(1) 'A' = CHAR(3) 'A ' = VARCHAR (54) 'A'
has nothing to do with variability. And has been that way since 1989.
Also since then, LIKE behaves differently.
Regards,
Ann