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

A left outer join B
B right outer join A gives the same result then what is
the use of two?

Answer Posted / nithya

Is ur query used in any situation? bcos
In general join is used in the following case:

consider "Persons" table:
P_Id LastName FirstName Address City
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

"Orders" table:
O_Id OrderNo P_Id
1 77895 3
2 44678 3
3 22456 1
4 24562 1
5 34764 15

left outer join:

SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
LEFT outer JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName

The result-set will look like this:
LastName FirstName OrderNo
Hansen Ola 22456
Hansen Ola 24562
Pettersen Kari 77895
Pettersen Kari 44678
Svendson Tove

right outer join:

SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
RIGHT JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName

The result-set will look like this:
LastName FirstName OrderNo
Hansen Ola 22456
Hansen Ola 24562
Pettersen Kari 77895
Pettersen Kari 44678
34764

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between having and where clause.

1019


What is sql server programming?

1090


What do you mean by a dependent functionality in a build?

1199


please differentiate between delete and truncate?

1039


What is the recovery model? List the types of recovery model available in sql server?

946


What is meant by dirty read?

1041


How to write a query with a left outer join in ms sql server?

1031


What are translations and its use? : sql server analysis services, ssas

1082


what are the three command line utilities and what are their primary functions?

153


What is sql server used for?

1099


What is a trigger? Why we need it?

1056


hi, how to link a text file and a .rpt file in my tables of sql server and to retrieve those records for further use. reply me as soon as possible.

2114


Explain transaction server explicit transaction?

974


What is PROJECTION Operation?

1076


Please explain that what are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

1021