11

Joins and different types of joins in sql

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Joins and different types of joins in sql
Page 2: Joins and different types of joins in sql

Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring PartnerBaabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd

Page 3: Joins and different types of joins in sql

Joins and different types of joins in SQL

[email protected] Alitwitter.com/usernamein.linkedin.com/in/

profilename9037896770

Page 4: Joins and different types of joins in sql

What is sql join?

A SQL join clause combines records from two or more tables in a database.

Page 5: Joins and different types of joins in sql

Sql joins

o INNER JOINo FULL OUTER JOINo RIGHT OUTER JOINo LEFT OUTER JOIN

Page 6: Joins and different types of joins in sql

INNER JOIN

The INNER JOIN keyword returns rows when there is at least one match in both tables.

SYNTAX:-SELECT column_name(s)FROM table_name1INNER JOIN table_name2ON table_name1.column_name=table_name2.column_name

Page 7: Joins and different types of joins in sql

FULL OUTER JOIN The FULL JOIN keyword return rows when there is a match in one of the tables.

SYNTAX:-SELECT column_name(s)FROM table_name1FULL JOIN table_name2ON table_name1.column_name=table_name2.column_name;

Page 8: Joins and different types of joins in sql

RIGHT OUTER JOIN

The RIGHT JOIN keyword returns all the rows from the right table (table_name2), even if there are no matches in the left table (table_name1).SYNTAX:-SELECT column_name(s)FROM table_name1RIGHT JOIN table_name2ON table_name1.column_name=table_name2.column_name

Page 9: Joins and different types of joins in sql

LEFT OUTER JOIN

The LEFT JOIN keyword returns all rows from the left table (table_name1), even if there are no matches in the right table (table_name2).

SYNTAX:-SELECT column_name(s)FROM table_name1LEFT JOIN table_name2ON table_name1.column_name=table_name2.column_name

Page 10: Joins and different types of joins in sql

If this presentation helped you, please visit our page facebook.com/baabtra and like it.

Thanks in advance.

www.baabtra.com | www.massbaab.com |www.baabte.com

Page 11: Joins and different types of joins in sql

Contact Us

Emarald Mall (Big Bazar Building)Mavoor Road, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

NC Complex, Near Bus StandMukkam, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

Start up VillageEranakulam,Kerala, India.

Email: [email protected]