-
Junior Member
Re: Types of Joins in SQL
1. Inner join 2. Outer join 3. Cross join 1. Inner join: inner join is the default type of join, it will producesses the result set, which contains matched rows only. Syntax: select * from table1table2 2. Outer join: outer join produces the results, which contains matched rows and unmatched rows. Here we have three types of joins, 1.left outer join 2.right outer join 3.full outer join left outer join: left outer join producesses the results, which contains all the rows from left table and matched rows from right table. Syntax: select * from table1table2 right outer join: right outer join producesses the resultset, which contains all the rows from right table and matched rows from left table. Syntax:select * from table1table2 full outer join: full outer join producesses the resultset, which contains all the rows from left table and all the rows from right table. Syntax:select * from table1table2 3.cross join: a join without having any condition is known as cross join, in cross join every row in first table is joins with every row in second table. Syntax: select * from table1table2 self join: a join joins withitself is called self join working with self joins we use alias tables.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules