How space is compared in where condition
I have Oracle on local. But you can see example on SQLFiddle

create table a1 ( i varchar(10));

insert into a1 values('a');
insert into a1 values(' ');
insert into a1 values('v ');

select * from a1 where i &lt;&gt; ' '; 
select * from a1 where i = ' ';
select * from a1 where i like '% %';