What is the exact difference b/w IN and EXIST in Oracle..?
Answers were Sorted based on User's Feedback
EXIST is used as conditional operator in which u can write a query
IN is also used as a conditional operator in which we gives a list of elements
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / moorthy g
select ename from emp e
where mgr in (select empno from emp whereename = 'KING');
Here's the EXPLAIN PLAN for this query:
OBJECT OPERATION
---------- ----------------------------------------
SELECTSTATEMENT()
NESTEDLOOPS()
EMP TABLEACCESS(FULL)
EMP TABLEACCESS(BY INDEX ROWID)
PK_EMP INDEX(UNIQUESCAN)
This query is virtually equivalent to this:
select e1.ename from emp e1,(select empno from empwhere
ename = 'KING') e2
where e1.mgr = e2.empno;
You can write the same query using EXISTS bymoving the outer
query column to a subquery condition, likethis:
select ename from emp e
where exists (select 0 from emp wheree.mgr = empno and
ename = 'KING');
When you write EXISTS in a where clause, you'retelling the
optimizer that you want the outer query to be runfirst,
using each value to fetch a value from the inner
query(think: EXISTS = outside to inside).
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sujeetha
It is almost similar to IN but the difference is that in
EXIST it will retrive the row atleast one row in the inner
query satisfies but in IN we can have manuy values
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pavan_615
IN- sub Query - it will be executed once for the full query
Exist - Co-related sub Query - it will be executed for each
row.-- exist will me faster when you are working with big
tables.
| Is This Answer Correct ? | 0 Yes | 0 No |
What does update strategy mean, and what are the different option of it?
Mention few power centre client applications with their basic purpose?
What do mean by local and global repository?
what is surrogatekey ? In ur project in which situation u has used ? explain with example ?
can we override a native sql query within informatica? How do we do it?
What is Test load plan? Let us assume 10 records in source, how many rows will be loaded into target?
When i run workflow first session runs 4 times 5th time 2nd session must run? How can u do?
How many transformations can be used in mapplets.
How we can create indexes after completing the loan process?
What is a standalone command task?
how many repositories can v create in informatica .
3 Answers Cap Gemini, Tech Mahindra,
is there any way to read the ms excel datas directly into informatica?like is there any possibilities to take excel file as target?