Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
Equi Join
Inner Join varA (+)= varB
Outer join varA = (+) varB.
THE DIFFERENT TYPES OF JOINS IN SQL ARE:-
1.INNER JOIN- THIS JOIN COMBINES THE COMMON ATTRIBUTE OF THE JOINING RELATION
2.LEFT JOIN- IN THIS JOIN THE PARENT RELATION IS ON THE RIGHT SIDE AND JOINING ATTRIBUTE IS ON THE LEFT SIDE
3. RIGHT JOIN- IN THIS JOIN THE PARENT RELATION IS ON THE LEFT SIDE AND THE JOINING ATTRIBUTE IS ON THE RIGHT SIDE
4. FULL OUTER JOIN- THIS JOIN COMBINES THE TWO ENTIRE RELATION
Types of the different SQL JOINs you can use:
I am suggesting a link which will help you with examples:
http://www.w3schools.com/sql/sql_join.asp
1) Inner Join ex:select *from table_1 as t1
inner join table_2 as t2
on t1.IDcol=t2.IDcol
2) Outer Join: left outer join
ex:select *from table_1 as t1
left outer join table_2 as t2
on t1.IDcol=t2.IDcol
right outer join :
ex:select *from table_1 as t1
right outer join table_2 as t2
on t1.IDcol=t2.IDcol
full outer join
ex:select *from table_1 as t1
full outer join table_2 as t2
on t1.IDcol=t2.IDcol
There are four basic types of SQL joins: inner, left, right, and full.
Inner Join
Let’s say we wanted to get a list of those customers who placed an order and the details of the order they placed. This would be a perfect fit for an inner join, since an inner join returns records at the intersection of the two tables.
select first_name, last_name, order_date, order_amountfrom customers cinner join orders o
on c.customer_id = o.customer_id
Left Join
If we wanted to simply append information about orders to our customers table, regardless of whether a customer placed an order or not, we would use a left join. A left join returns all records from table A and any matching records from table B.
select first_name, last_name, order_date, order_amountfrom customers cleft join orders o
on c.customer_id = o.customer_id
Right Join
Right join is a mirror version of the left join and allows to get a list of all orders, appended with customer information.
select first_name, last_name, order_date, order_amountfrom customers cright join orders oonc.customer_id=o.customer_id
Full Join
Finally, for a list of all records from both tables, we can use a full join.
select first_name, last_name, order_date, order_amount from customers c full join orders o on c.customer_id = o.customer_id
SQL Server has four type of join (inner join, left outer join, right outer join and full join)
Inner join: return all rows against the relation between of both table
Left outer join: return all row from the left table and relation match row of the right side table
Right outer join: return all row from the right table and relation match row of the left side table
Full Join: return all rows from left and right side tables both.
Joins are operational commands use to join Same or different field Data set, from different tables.
QL injection contains some dynamic statements which can be pass into SQL error affected area and retrieve the desired results from a database.
there are 3 types of joins used .
1. Inner join
2. Outer join3. Full join