What different of iner joint & outer joint with example
Answers were Sorted based on User's Feedback
Answer / joel
inner join will select the record that are match only. it is
just like equi join. but outer join select the record not
only the equal one but also select the not equal one.
outer join is of three type namely
right outer,
left outer and
full outer.
1) right outer join will be like below in the join condition
e.deptno(+)=d.deptno.
that is it select all the uncommon values including common
values from the table e.
2)while left outer join will be like below in the join condition
e.deptno=d.deptno(+);
it will select uncommon values including common values
from table d.
3) full outer join is as like inner join. it will select
common values only
| Is This Answer Correct ? | 14 Yes | 6 No |
Answer / nusrath sultana
Inner join:fetch the data when matched,similar to equi join.
Outer join:fetch the data matched as well as some unmatched
data.
there are three types of outer join :
1)left outer join:it will fetch the data when matches in two
or more relation and the unmatched data from the left
relation is also selected.
SQL>SELECT E.ENAME,E1.COMM FROM EMP E LEFT OUTER JOIN EMP E1
ON E.EMPNO=E1.EMPNO;
2)right outer join:it will fetch the data when matches in
two or more relation and the unmatched data from the right
relation also selected.
SQL>SELECT E.ENAME,E1.COMM FROM EMP E RIGHT OUTER JOIN EMP
E1 ON E.EMPNO=E1.EMPNO;
3)full outer join:it will fetch the data when matches in two
or more relation and the unmatched data from the BOTH
relations are also selected.
SQL>SELECT E.ENAME,E1.COMM FROM EMP E FULL OUTER JOIN EMP E1
ON E.EMPNO=E1.EMPNO;
| Is This Answer Correct ? | 1 Yes | 0 No |
INNER JOIN: inner join fetch only matched data from 2 or
more tables.
ex: select empno, ename, e1.deptno, d1.deptno, dname
from emp e1, dept d1
where e1.deptno = d1.deptno;
output will the all records whose deptno is exists in both
table (emp and dept)
OUTER JOIN: is used to fetched matched and unmatched data
from 2 or more tables.there are 3 type of outer join:
Right outer join , Left outer join, Full outer join.
Right outer join will display the matched and unmatched
records of right side located table.and Left outer join does
just opposite of it.and Full outer join will display matched
and unmatched both type of records from both tables.
ex: select empno, ename, e1.deptno, d1.deptno, dname
from emp e1 right outer join dept d1
on e1.deptno =d1.deptno;
| Is This Answer Correct ? | 2 Yes | 4 No |
Answer / rizwan khan
inner Join used for Display All Match Data From two or
multible table.
Outer Join :- Display All unmached data.
| Is This Answer Correct ? | 4 Yes | 8 No |
How will you differentiate between varchar & varchar2?
I have two tables : COuntry,city I want all the cities in each country.Question on Cross Join.
What is an Oracle view?
What are group functions in oracle?
What is blob data type in oracle?
Can we call a trigger inside a function and function inside a trigger? Give example.
Difference between NO DATA FOUND and %NOTFOUND?
How to define default values for formal parameters?
HOW TO CONVERT ORACLE TABLE DATA (RECORDS)INTO EXCEL SHEEET?
What are the different windows events activated at runtime ?
can anyone help me ? an index has been done on the primary key of a table. an update operation was performed on that table. now my question is 1> what abt the performance ? means faster or slower due to indexing ? 2> does the operation affect to the primary key constraint ?
What is proxy method?