What is the difference between IN and Exists in Oracle?

Answers were Sorted based on User's Feedback



What is the difference between IN and Exists in Oracle?..

Answer / ram

exists improves the performance because it returns boolian
value where as 'in' is not...so exists simplyfies internal
calculations....

Is This Answer Correct ?    9 Yes 1 No

What is the difference between IN and Exists in Oracle?..

Answer / pankaj

In sql server,

WHEN YOU USE 'IN', WHILE CHECKING FOR WHERE CONDITION SQL SERVER ENGINE DOES WHOLE TABLE SCAN. IF YOU USE 'EXISTS' AS SOON AS ENGINE FINDS THE REQUIRED ROW IT WILL STOP EXECUTING QUERY AND GOING FURTHER SCANNING TABLE.

In Oracle,
EXISTS is very faster than IN (when the subquery results is very large)

IN is faster than EXISTS (when the subquery results is very small)

In Example -
select ename from emp
where mgr in (select empno from emp where ename = 'KING');

Exists Example -
Select ename from emp a where exists ( select 0/null from emp b where a.mgr=b.empno and ename='KING')

Is This Answer Correct ?    3 Yes 1 No

What is the difference between IN and Exists in Oracle?..

Answer / sri

when the condition is in a subquery then in will be used
where if there is a condition in superquery
(parent) exists will be used. Usage of IN will improve the
performance

Is This Answer Correct ?    0 Yes 10 No

Post New Answer

More Informatica Interview Questions

how can you load data into target table without leading zeor's

4 Answers   Deloitte,


Which transformation should we use to normalise the COBOL and relational sources?

0 Answers   Informatica,


hi all, Can anyone please tell me the relationship between informatica and business objects

1 Answers  


what is unit testing?tell me proceedure

0 Answers   L&T, UST,


What is Session and Batches?

0 Answers   Informatica,






I have a source file its is CSV(comma separated). I want to convert it to tab separated. Make sure the conversion happens on all commas except the ones enclosed in Double quotes .

2 Answers   CTS,


what is the process of target load planing?

2 Answers   IBM,


How to generate the HTML output using Informatica.

3 Answers   Wipro,


Explain reference cursor?

1 Answers  


what is granularity,what type of granularity we will take in fact tables either lowlevel or highlevel,if two tables having same granularity that is posiable or not

0 Answers  


How can we update a record in the target table without using update strategy?

0 Answers  


Roles and Responsibilties of Informatica Production Support Member?

6 Answers  


Categories