Subject | Like, = and space in varchar |
---|---|
Author | Philippe Makowski |
Post date | 2005-01-20T10:14:18Z |
Hello
can someone explain me this :
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
can someone explain me this :
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