What different of iner joint & outer joint with example

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to run queries on external tables?

570


What is oracle in java?

524


Give the various exception types.

550


How to convert numbers to characters in oracle?

590


What is oracle database 10g express edition?

599






How index is implemented in oracle database?

596


How to use null as conditions in oracle?

584


How to install oracle database 10g xe?

564


How does oracle handle read consistency?

680


How to create a new table by selecting rows from another table?

553


How to see the table columns used in an index?

596


What do you mean by a database transaction & what all tcl statements are available in oracle?

553


How to enter a new row into a table interactively?

550


what are bitmap indexes? How does they work?

1719


What happens to indexes if you drop a table?

701