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 is workflow manager?
i have a session which creates a file every time when i runs the session, but it replaces the first file with second file,i want to append the second file follwed by first file when i runs the session,how to achieve this?
How to display session logs based upon particular dates. If I want to display session logs for 1 week from a particular date how can I do it without using unix. ?
HOE DO U IMPLIMENT SCHEDULING IN INFORMATICA?
Hi, What is version control in Informatia ? Can anyone just give an idea or introduction about this? Advance Thanks
What is partioning?how many types of partinings are there
What is the diff. b/w informatica versions 8.1.1 and 8.6.1?
there is a mapping with expression and mapping we create some condition for insert and update and followed by update startegy ,can we update and insert on a single target based on condition?
How can you generate reports in informatica?
i have 5 session (s1,s,2,s3,s4,s5)i want to execute first 4 session after 5th session how will you do?
i have a source which relational.I am trying to populate to target flat file with one column for daily date which is sysdate. I want to populate the sysdate coulmn with DD/MM/YYYY format. kindly provide a solution for this..my clear that my target is flat file.
Source Qualifier is an active t/r but there is no change of row count then y should we called it active t/r & Router , sorter some times no change in row count then Y we called its active t/r?