Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between IN and Exists in Oracle?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can informatica load heterogeneous targets from heterogeneous sources?

1235


What are the different options available for update strategy?

1054


What is Cognos script editor?

4290


How to do unit testing in informatica?

1229


Define enterprise data warehousing?

1257


How would you copy the content of one repository to another repository?

1058


What is substr in informatica?

1262


Describe expression transformation?

1170


Differentiate between reusable transformation and mapplet.

1144


pmscmd startworkflow -sv -d -u -p -f while running this command I got the error as "no gateway connectivity is provided for your domain name". So anyone please help me how to rectify this error?

1559


in staging we are merging the data and remove the inconsistants data that type of situation what u will done and type of functions u can use

2073


What are the new features of Power Center 5.0?

1848


What is the surrogate key?

1365


What will happen if the select list columns in the custom override sql query and the output ports order in sq transformation do not match?

1021


What is meant by pre and post session shell command?

1202