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 materialized view?

2 Answers  


My source table look like ID Name Location Salary 1 ran NULL NULL 1 NULL DELHI NULL 1 NULL NULL 1000 I want my output to look like ID Name Location Salary 1 ran Delhi 1000 What should be my approach to design a informatica mapping. Assuming my source is flat file not a Relation table so i cant use SQL.

2 Answers   BirlaSoft,


How i can Schdule the Informatica job in "Unix Corn Schduling tool" ?

2 Answers  


Can anyone tell me the new features in Informatica 9 Version?

2 Answers   Syntel,


What all are steps in up gradation of Informatica server?

0 Answers  






Workflow is long running due to long running sql query so when we refer the query plan it tells the issue is due to partition of the db table. How to handle this?

0 Answers  


is it possible to index the data in cache of lkp transformation ?

0 Answers  


What is log file,and where is it located,why u r using the log file

1 Answers   TCS,


Without source how to insert record to target?

6 Answers  


What is the difference between source qualifier transformations source filter to filter transformation?

0 Answers  


Can we use the mapping parameters or variables created in one mapping into any other reusable transformation?

0 Answers   Informatica,


What are the Differences between connected and unconnected lookup?

6 Answers   TCS,


Categories