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

How to verify a user name with sqlcmd tool?

1061


what is a join and explain different types of joins? : Sql server database administration

942


What are policy management terms?

970


Write a SQL queries on Self Join and Inner Join.

1031


what is the sql equivaent of the dataset relation object ?

2003


How do you drop an index?

906


how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration

893


In what three ways is the return statement used in a stored procedure?

992


What objects does the fn_my_permissions function reports on? : sql server security

1023


Why are sql functions used?

1102


What is equi join with example?

1100


Why is sql server log file full?

1018


What stored by the msdb?

981


Call by value and call by reference in procedure and function, with NOCOPY.

1285


How to list all triggers in the database with sys.triggers in ms sql server?

1059