.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!



Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

what is the difference detween inner join and outer join

Posted By: dimple     Posted Date: June 24, 2010    Points:2   Category :Sql Server
what is the difference detween inner join and outer join in SQL server. Please explain in detail.

Responses
Author: Syed Shakeer Hussain             
Posted Date: June 24, 2010     Points: 5   

Hi,
Inner Join:- The INNER JOIN keyword return rows when there is at least one match in both tables

syntax:
SELECT column_name(s)
FROM table_name1
INNER JOIN table_name2
ON table_name1.column_name=table_name2.column_name

outer Join:- Use the SQL OUTER JOIN whenever multiple tables must be accessed through a SQL SELECT statement and results should be returned if there is not a match between the JOINed tables.

It can be useful when there is a need to merge data from two tables and to include all rows from both tables without depending on a match. Another use is to generate a large result set for testing purposes.

for more information check the following link
http://infogoal.com/sql/sql-outer-join.htm

Author: Mallikarjuna Chigicherla             
Posted Date: June 24, 2010     Points: 5   

Inner Join:

The INNER JOIN keyword return rows when there is at least one match in both tables


outer Join:-
Use the SQL OUTER JOIN whenever multiple tables must be accessed through a SQL SELECT statement and results should be returned if there is not a match between the JOINed tables.

Thanks & Regards,
Mallikarjuna Chigicherla
Author: Sunil Yadav       [Moderator]      
Posted Date: June 26, 2010     Points: 5   

Inner join returns data from two tables if the match is found.
Outer join returns all the rows from One table and matched rows from second table.


Author: Mallikarjuna Chigicherla             
Posted Date: August 04, 2010     Points: 5   

Inner Join:
It Results only Matched Rows Between Two Tables:
------------------------------------------------------------------------------------------------
Outer Join:
1)Left Outer Join: Matched Rows From two tables And Unmatched rows from Left table
2)Right Outer Join:Matched Rows From two tables And Unmatched rows from Right table
3)Full Outer Join :Matched Rows And Unmatched Rows from Two tables.


please Check This link once:
----------------------------------------------------------------------------------------------
http://www.dotnetspider.com/resources/635-SQL-Joins-wi-Examples.aspx

Thanks & Regards,
Mallikarjuna Chigicherla


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend