AND requires both conditions to be true.
EXAMPLE:
Select empno,ename,sal from emp where ename = ‘KHALID’ AND job
= ‘MANAGER’;
OR requires either condition to be ture.
EXAMPLE:
Select empno,ename from emp where ename = ‘KHALID’ OR job =
‘MANAGER’;
NOT negate the condition
EXAMPLE:
Select job from emp where name NOT IN (‘KHALID’,’ARSALAN’);
Select ename from emp where job NOT LIKE ‘CL%’;
PRECEDENCE RULE:
EVALUATION ORDER | OPERATOR |
1 | NOT |
2 | AND |
3 | OR |
No comments:
Post a Comment