2/08/2011

SQL Joins

What is a join where and how is it used?

A join is a query that combines rows from two or more tables.whenever multiple tables appear in a query from clause then we can use joins to execute that query.

TYPES OF JOINS
  1. EQUI JOIN
  2. NON EQUI JOIN
  3. OUTER JOIN
  4. SELF JOIN

EQUI JOIN : In equi join more then one table are joined together with the help of common column that exists in both table. this is also called as simple join or inner join
Table aliases: These are used in place of table name for the select statement and valid only for current select statement.

NON EQUI JOIN :A non equi join is a join condition containing other then equal operator. condition such as <=,>=,<>,Between.

OUTER JOIN : a) left outer join b)right outer join
outer join

No comments:

Post a Comment