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

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

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

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;

연산자 우선순위 : and > or
or 보다 and가 먼저 검색되어 2번째 sql문과 같은 순서로 1번째 sql문 계산됨
and보다 or을 먼저 계산하고 싶은 경우 괄호 활용
select * from sample24 where (a=1 or a=2) and (b=1 or b=2);

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

not: 입력한 조건식의 반대값을 반환
like 술어를 사용하여 패턴 매칭으로 검색 가능