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

what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?

2042


How can I introduce multiple conditions in like operator?

547


Explain what are clusters?

608


Whether any commands are used for months calculation? If so, what are they?

592


how to use select statement as formal parameter in procedure specification?(someone said that using string) ex:-procedure(a in number,select ename from emp ) i am asking syntax like this?

1522






What are the uses of a database trigger?

516


does the query needs a hint to access a materialized view?

1461


How to join two tables in a single query using oracle?

560


How many types of auditing in Oracle?

563


What is clustered table in Oracle?

639


What is the difference between Delete, Truncate and Drop in Oracle?

602


What is the difference between a user and a schema in oracle?

556


What is the difference between online and offline backups?

560


What are named parameters?

608


Why is oracle so popular?

558