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 does role playing dimension mean?

0 Answers  


While migrating the data from one environment to another environment how would you manage the connections?

0 Answers  


What is ThroughPut in Informatica, How it works, Where I can find this option to check ?

5 Answers   CTS,


What are the parts of Informatica Server?

1 Answers   Cognizant,


What is difference between Informatica 6.2 Workflow and Informatica Workflow 7.1

4 Answers   IBM,






my source is junk data how will u remove that junk data by using unix please any one replay me

0 Answers   Cap Gemini,


i have a table with name field. i,e name Shankar prabhakar nitikripa so no if a occures 3 times in name then it will go to tgt A if b occures 3 times in name then it will go to tgt b .. if z occures 3 times in name then it will go to tgt z

1 Answers   HCL,


After draging the ports of three sources(sql server,oracle,informix) to a single source qualifier, can you map these three ports directly to target?

6 Answers  


How can we get multiple output values using an unconnected lookup transformation?

2 Answers   TCS,


can v update d records in target using update stargey without generationg primary key ? explain

4 Answers   CTS,


Hi, I am new to Informatica, What is a flat file and how to use flat file in infomratica please help me.

10 Answers   CSC,


How many ways are there to do 'remove duplicate records in informatica'?

0 Answers  


Categories