use of IN/ANY/ALL

Answer Posted / manoj

IN- It will return the value based on the parameter;
e.g. select * from emp where salary in ('1000','3000');

ANY-It will compare with any value that has been returned by
the parameter;

select * from emp where salary > any(select salary from emp
where deptno=10)
the salary will be compared with any value that has been
returned by the subquery.

ALL-It will compare with max/min value that has been
returned by the subquery;

select * from emp where salary > all(select salary from emp
where deptno=10)
the salary will be compared with the longest value that has
been returned by the subquery.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use partitions in sql?

534


What is application trigger?

533


What is the use of primary key?

530


Explain how exception handling is done in advance pl/sql?

542


Is pl sql a scripting language?

574






What mean sql?

574


Explain the components of sql?

581


Explain what is table in a database?

568


Who developed sql?

561


what is error ora-03113: end-of-file on communication channel?

592


What is on delete set null?

557


Explain two easy sql optimizations.

593


What is bind reference and how can it be created?

569


How to get each name only once from an employee table?

598


How to write a query to show the details of a student from students table whose

533