select * from sample24;
select * from sample24 where a>0 and b<>0;

Untitled

select * from sample24 where a>0 or b<>0;

Untitled

select * from sample24 where a=0 or a=1;
select * from sample24 where a=0 or 1;(안됨!)

Untitled

select * from sample24 where a=1 or a=2 and b=1 or b=2;
select * from sample24 where a=1 or (a=2 and b=1) or b=2;

Untitled

select * from sample24 where (a=1 or a=2) and (b=1 or b=2);

Untitled

select * from sample24 where not (a<>0 or b<>0);

Untitled