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

what is the mechanism of the Master-Detail joining condition?

6 Answers   IBM, Patni,


What is constraint based loading exatly? And how to do this? I think it is when we have primary key-foreign key relation ship. Is it correct? please answer me. Advance Thanks.

4 Answers  


Hi gurus can any one tell me with a flow how to implement SCD Type 1 and SCD Type 2 in a single mapping.For some fields SCD type has to be implemented and for some fields scd type has to be implementd..Thank in advance....

1 Answers  


What are the differences between joiner transformation and source qualifier transformation?

0 Answers   Informatica,


What does “tail –f” command do and what is its use as an Informatica admin.

0 Answers  






what are the output files that the informatica server creats during running a session?

2 Answers   CTS,


how to declare array in plsql?

1 Answers  


AT the max how many transformations and mapplets can we use in a mapping ?

1 Answers   Cap Gemini, Cognizant,


Is it possible to update the target table with PK?

1 Answers   TCS,


tell me the push down optimization

2 Answers   Wipro,


What is mapplet and a reusable transformation?

2 Answers  


Explain joiner transformation in informatica

0 Answers   Informatica,


Categories