- This operator is used to test for values in a specified list.
- This operator can be used upon any data type.
- The negation of the operator is NOT IN.
Examples
:-
Select ename, sal, job from emp where ename IN(‘ALLEN’
, ‘SCOTT’);
Select ename, sal, job from emp where ename NOT IN(‘ALLEN’
, ‘SCOTT’);
Select ename, sal, job, deptno from emp where
deptno IN(10,30);
Select ename, sal, job, deptno from emp where
deptno NOT IN(10,30);
Select ename, sal, hiredate from emp where hiredate
IN(’02-APR-81’ , ’12-JAN-83’);
Select ename, sal, hiredate from emp where hiredate
NOT IN(’02-APR-81’ , ’12-JAN-83’);
No comments:
Post a Comment