What is the difference between IN and Exists in Oracle?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / imran
The EXISTS clause is used to check the existence of rows returned by a subquery. It returns TRUE if the subquery returns one or more rows.
The IN clause is used to filter rows based on a list of values or a subquery result set. It checks if a value matches any value in a list or subquery.
| Is This Answer Correct ? | 0 Yes | 0 No |
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 |
How do you load unique records into one target table and duplicate records into a different target table?
 Suppose you have n no.of records @ your flat file and you have seen some of records are missing while reaching to the destination. How can you trouble shoot it?
List the transformation used for the following: (1) Heterogeneous Sources (2) Homogeneous Sources (3) Find the 5 highest paid employees within a dept. (4) Create a Summary table (5) Generate surrogate keys
What is the difference between Bulk Load and Normal Load
I need an oracle query for convert Char to Integer?. Can any one help me how to do this?
What all join we can perform in LOOKUP transformation?
following source name gender ramya female ram male deesha female david male kumar male i want the target male female ram ramya david deesha kumar any body give solution above question?
Plz can anybody send Informatica and Cognos FAQ Plz To thid ID anil643@gmail.com (or) kumar643@gmail.com
in which situations do u go for scds ?
What is the internal processes of integration server in Informatica? How data will be extract and load to the target?
How many ways are there to do 'remove duplicate records in informatica'?
split two strings into two columns For Eg. Source:-Full Name: Shiva Kumar Target:- First Name:Shiva Last Name:Kumar
1 Answers Cap Gemini, TCS, Wipro,