drop if exists table t1;
create table t1 ( a int not null, b int not null);
create primary index on t1(a,b);

insert into t1 values ( 1, 1);
insert into t1 values ( 1, 2);
insert into t1 values ( 2, 1);
insert into t1 values ( 2, 2);
insert into t1 values ( 1, 3);
insert into t1 values ( 2, 3);
insert into t1 values ( 1, 4);
insert into t1 values ( 1, 5);

-- plan select * from t1 where a = 1 and b != 2;
select * from t1 where a = 1 and b != 2;