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

How do I remove sql plus from windows 10?

568


how tsql statements can be written and submitted to the database engine? : Transact sql

534


What is the difference between sum and count in sql?

528


What is a variable in sql?

514


i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this

1065






What are the features of pl sql?

563


What is cursor and its types?

561


What are the types of index in sql?

533


What is the difference between partitioning and sharding?

530


What is pl sql and why it is used for?

574


What is difference between primary and secondary key?

519


How do you optimize a stored procedure in sql?

502


What is multiple columns?

574


what is the difference between join and union? : Sql dba

548


How do you create a unique index?

573