Answer Posted / mohamed shahid(broadline)
IN:-EQUAL TO ANY MEMBER
EX:-
---
SELECT ENAME,SAL,DEPTNO FROM EMP WHERE SAL IN(SELECT MIN(SAL) FROM EMP GROUP BY DEPTNO);
ANY(<):-COMPARES VALUE TO EACH VALUE RETURNED BY THE SUBQUERY
EX:-
SELECT EMPNO,ENAME,JOB FROM EMP WHERE SAL<ANY(SELECT SAL FROM EMP WHERE JOB='CLAERK');
NOTE:-IT MEANS LESS THAN MINIMUNM VALUE.
ANY(>):-
------
SELECT EMPNO,ENAME,JOB FROM EMP WHERE SAL>ANY(SELECT SAL FROM EMP WHERE JOB='CLERK');
NOTE:-
-----
>ANY:-IT MEANS MORE THAN MINIMUM
=ANY:- IT IS EQUIVALENT TO IN OPERATOR
ALL:-COMPARES VALUE TO EVERY VALUE RETURNED BY THE SUBQUERY
SELECT EMPNO,ENAME,JOB FROM EMP WHERE SAL>ALL(SELECT AVG(SAL) FROM EMP GROUP BY DEPTNO);
NOTE:-
---
>ALL IT MEANS MORE TAHN MAXIMUM
SELECT EMPNO,ENAME,JOB FROM EMP WHERE SAL<ALL(SELECT AVG(SAL) FROM EMP GROUP BY DEPTNO);
NOTE:-
---
ALL<:-IT MEANS LESS THAN MINIMUM
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the different parts of a package?
what are the system privileges that are required by a schema owner (user) to create a trigger on a table?
what's the difference between a primary key and a unique key? : Sql dba
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
What is restrict in sql?
How to create an array in pl/sql?
How can we debug in PL/SQL?
What is pl sql and why it is used for?
Can we update views in sql?
Why is sql*loader direct path so fast?
How many sql statements are used? Define them.
What information is needed to connect sql*plus an oracle server?
What is mdf ldf and ndf?
Which tcp/ip port does sql server run on? How can it be changed? : Sql dba
What does select * from mean in sql?