Subject | Re: [firebird-support] Like, = and space in varchar |
---|---|
Author | Ivan Prenosil |
Post date | 2005-01-20T11:27:36Z |
> can someone explain me this :It is correct, LIKE considers trailing spaces,
>
> create table ztest (car varchar(5));
> commit;
> insert into ztest (car) values ('');
> insert into ztest (car) values (' ');
> insert into ztest (car) values (' ');
> insert into ztest (car) values (' ');
> insert into ztest (car) values (' ');
> insert into ztest (car) values (' ');
> commit;
>
> then
> select Count(*) from ztest
> where car like ' '
> return 1
>
> select Count(*) from ztest
> where car = ' '
> return 6
while comparisons don't.
Ivan