Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What will be the syntax to find current date and time in format "yyyy-mm-dd"?

1009


Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

2059


How to apply filtering criteria at group level in oracle?

1038


How do I spool in oracle?

1000


What is oracle database client?

1030


How to generate query output in html format?

1113


Give the advantages and disadvantages of clusters.

1050


How to do a full database export?

1103


How to start your 10g xe server?

1035


What is index in Oracle?

1069


Can I create users through internet explorer in oracle 10g?

1078


Explain the use of record length option in exp command.

1064


Briefly explain what is literal? Give an example where it can be used?

1023


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

2255


What is background process in Oracle?

1099