ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the main difference between inner join and outer join in SQL?

user-image
تم إضافة السؤال من قبل ali sabra , Programmer-technical support , Business concept for software solutions
تاريخ النشر: 2016/04/01
Rashid Irshad
من قبل Rashid Irshad , Web & Software Trainer , AGT

Inner=left+right if both sides have record then show or link

مستخدم محذوف‎
من قبل مستخدم محذوف‎

Oracle INNER JOINS return all rows from multiple tables where the join condition is met

Oracle FULL OUTER JOIN. This type of join returns all rows from the LEFT-hand table and RIGHT-hand table with nulls in place where the join condition is not met.

Dilsha Hasan
من قبل Dilsha Hasan , SSE , TCS

Inner Join is nothing but equi Join. Inner join will gives only Matched rows from tables where as outer join gives matched and unmatched rows .

RONIT NAIK
من قبل RONIT NAIK , Software Engineer , Delta Technology Management & Services

Inner Join is nothing but an equi join. Here we get resultant set of rows based on common values present in joining tables.Whereas, in case of outer join, which is a non-equi join gives resultant set of rows as collection of both matching data & non-matching data where latter is matched with null values.  

Madiha Kamal
من قبل Madiha Kamal , Senior Associate Technical Consultant , A. F. FERGUSON & CO. - PwC Pakistan

An inner join will only select records where the joined keys are in both specified tables while a left outer join will select all records from the first table, and any records in the second table that match the joined keys.

INNER JOIN

An inner join gives the intersection of the two tables,

OUTER JOIN

LEFT OUTER JOIN

 left outer join will give all rows in A, plus any common rows in B.

RIGHT OUTER JOIN

right outer join will give all rows in B, plus any common rows in A.

FULL OUTER JOIN

A full outer join will give you the union of A and B, i.e. all the rows in A and all the rows in B. If something in A doesn't have a corresponding datum in B, then the B portion is null, and vice versa.

malli karjun
من قبل malli karjun , Senior Developer , Tech Mahindra

inner join returns only matched values from the tables joining.

but in the case of outer join again three categories are there 1.left outer 2.right outer 3.full outer

 based on the given join condition, in left outer : all values from left side table and matched values from right side table.

2.right outer: all values(records) from right side table and matched values from left table

3.full outer : all values from from the both tables. 

 

Basith Basheer
من قبل Basith Basheer , Senior Web and Mobile Application Developer , Ministry Of Interior - Kuwait

Inner join is the intersection between two tables, that have the common fields.

 

Outer join contains 3 types (right, left and full).

The left outer join gives all the rows in table 1(left table) and common rows from the table 2(right table).

The right outer join gives all the rows from the table 2(right table) and common from the table 1(left table).

The full outer join gives all the rows from the table 1 and table 2.

محمد عيد محمد ابراهيم
من قبل محمد عيد محمد ابراهيم , Oracle Developer , mashreq Aribia

Inner join on Products returns information about only those products that are common in both tables

outer join contain 3 types (right ,left and full) 

right outer join return all date in table 2 and all the shared data

left outer join return all data in table 1 and all the shared data

full outer join return all data from two or more tables 

 

 

Anees Ahmed
من قبل Anees Ahmed , Assistant Managre - Technical Lead , DM Health Care

Inner Join shows matches when it exists in both table, whereas outer join shows matches when it exists in either table

Muhammad Ahmed
من قبل Muhammad Ahmed , Assistant Manager , Treet Group of Corporation Lahore

Inner Join

An inner join focuses on the commonality between two tables. When using an inner join, there must be at least some matching data between two (or more) tables that are being compared. An inner join searches tables for matching or overlapping data. Upon finding it, the inner join combines and returns the information into one new table.

Outer Join

An outer join returns a set of records (or rows) that include what an inner join would return but also includes other rows for which no corresponding match is found in the other table.

There are three types of outer joins:

  • Left Outer Join (or Left Join)
  • Right Outer Join (or Right Join)
  • Full Outer Join (or Full Join)

المزيد من الأسئلة المماثلة