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.
Ex: select * from emp where empno in(....) and
select * from emp where empno exists(....)

What is the difference between a Join and Union and Union
and UnionAll.

Answer Posted / gopi muluka

IN:Returns true if the column matches to any value in a
subquery or a list.
Exists:Returns true if a subquery contains any row.

Generally EXISTS is faster than IN, because it stops
processing once it finds a row in resultset

Join : Returns only rows which are matching on Joining
Column

Union: Combines two or more resultsets with same number of
columns and displays it as a single resultset by
eliminating duplicate records

Union All: Combines two or more resultsets with same number
of columns,displays it as a single resultset including
duplicate records if any exists

Is This Answer Correct ?    16 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain database normalization?

1214


Explain what is “asynchronous” communication in sql server service broker?

914


How do you start single user mode in clustered installations?

937


How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?

2014


What is order of B+tree?

1106


How will you hide an attribute? : sql server analysis services, ssas

955


What are the advantages of paper records?

960


What are examples of triggers?

1085


What to check if a User database is locked?

1061


Where does the copy job runs in the log shipping primary or secondary? : sql server database administration

1039


between cast and convert which function would you prefer and why?

951


What is difference between equi join and natural join?

1031


How to rename an existing table with the "sp_rename" stored procedure in ms sql server?

1025


How to copy data from one table to another table?

993


Which data type columns are the best candidates for full-text indexing?

964