What are joins..how many types of joins are there?
Answer Posted / rakesh
Total Joins of 8 types::
table1: emp[ename,city]
table2: emp_sal[ename,salary]
1]self join
select e2.ename from emp e1, emp e2 where e1.city=e2.city
and e1.ename="Ram"
2]Natural Join
select ename,city,salary from emp natural join emp_sal
3]cross join
select ename,city,salary from emp cross join emp_sal
4]left outer join : all rows from left table
select e1.ename,city,salary
from emp e1,emp_sal e2
where (e1.ename=e2.ename(+))
5]right outer join : all rows from right table
select e1.ename,city,salary
from emp e1,emp_sal e2
where (e1.ename(+)=e2.ename)
6]full outer join : all rows from [left table+right table]
select e1.ename,city,salary
from emp e1,emp_sal e2
where (e1.ename=e2.ename(+))
UNION
select e1.ename,city,salary
from emp e1,emp_sal e2
where (e1.ename(+)=e2.ename)
OR CAN SAY:
select ename,city,salary
from emp e1 full outer join emp_sal e2
where e1.ename=e2.ename
7]Equi Join/simple join/inner join
select e1.ename,e2.salary
from emp e1, emp_sal e2
where e1.ename=e2.ename
8]Non Equi Join
select e1.ename,e2.salary
from emp e1, emp_sal e2
where e2.salary BETWEEN 1000 and 2000
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
Explain oracle 12c new features for developers?
What is the difference between I and G in Oracle?
What is a data dictionary and how can it be created?
what is the difference between functional dependecy and multilevel dependency?
How can windows applications connect to oracle servers?
What are the four Oracle system processes that must always be up and running for the database to be useable?
Assuming that you are an End User How to find that in the payment Batch some of the Invoice was Missing To pay How to find That??
What is ASM (Automatic Storage Management) in Oracle?
What is connection pooling in oracle?
How to install oracle database 10g xe?
How do I limit the number of oracle database connections generated by weblogic server?
How translate command is different from replace?
What do the 9i dbms_standard.sql_txt() and dbms_standard.sql_text() procedures do?
How to run queries on external tables?
List out the components of logical database structure of oracle database.