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...

explain different types of jions with examples briefly?

Answer Posted / soni

Inner join: This type of join displays matched rows from
tables.
this is based on equality condition ,so also called
equijoin.
exp- select empid,d.deptid,deptname,empname,location,salary
from emp e inner join dept d on e.deptid=d.deptid

Cross join: this is not based on any condition. It results
every row of one table matching with every row of another
table.
exp- select * from emp cross join dept

Self join: This ype of join joins a table to itself.


outer join:
Three types -
a.left outer join: It reults mathed rows from both tables
as well as all unmatched rows from left table.
exp- select empid,d.deptid,deptname,name,location,salary
from emp e left outer join dept d
on e.emp=d.dept

it displays all data from emp table .

right Outer join:It reults mathed rows from both tables as
well as all unmatched rows from right table.
exp- select empid,d.deptid,deptname,name,location,salary
from emp e right outer join dept d
on e.emp=d.dept

it displays all data from dept table .

Full Outer Join: This type of join results all matched
rows from both tables as well as umatched rows from both
tables.
exp.-select empid,d.deptid,deptname,name,location,salary
from emp e full outer join dept d
on emp e=d.dept d
It displays all matched and unmatched rows from both emp
and dept tables.

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you understand by change data capture?

935


Explain how many normalization forms?

967


how would you improve etl (extract, transform, load) throughput?

969


What will be the maximum number of index per table?

951


Can you tell me some of the common replication dmv's and their use? : sql server replication

870


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

1961


When would you use it?

943


What are truncate options available in sql server? : sql server database administration

966


What is the difference between dbcc indexdefrag and dbcc reindex?

930


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2530


Why should you use or avoid select * statements?

967


How to provide default values to stored procedure parameters?

1002


Explain ms sql server reporting services vs crystal reports?

855


What are the key configuration files for sql server reporting services ?

160


What is faster join or union?

1108