WHAT ARE THE TYPES OF JOINS IN SQL?

317 viewsSQLSQL
0

WHAT ARE THE TYPES OF JOINS IN SQL?

Saraswat World Changed status to publish June 8, 2023
0
TYPES of JOIN in SQL
TYPES of JOIN in SQL

JOINย clause combine rows from two or more tables, based on a common field between them.

There areย fiveย types of JOIN, defined byย ANSI standard SQLโ€“

Sr. JOIN TYPES USAGE
1 INNER JOIN Returns records that have matching values in both tables
2 LEFT OUTER JOIN Returns all records from left table and matching records from right table
3 RIGHT OUTER JOIN Returns all records from right table, and matching records from the left table
4 FULL OUTER JOIN Returns all records when there is a match in either left or right table
5 CROSS JOIN Returns combinations of each row of the first table with the each row from second table.
TYPE OF JOINS IN SQL

Syntax for INNER JOIN,LEFT JOIN,RIGHT JOIN,FULL OUTER JOIN-

SELECTย <column_name(s)>

FROMย <table1>

[INNER JOIN|LEFT JOIN|RIGHT JOIN|FULL OUTER JOIN]<table2>

ONย <table1.column_name=table2.column_name>

WHERE<condition>;

Syntax for CROSS JOIN-

SELECTย <column_name(s)>

FROMย <table1>

CROSS JOIN<table2>;

Saraswat World Changed status to publish June 8, 2023
You are viewing 1 out of 1 answers, click here to view all answers.
Write your answer.

Posted

in

Tags:

Comments

Leave a Reply

Ganesh Ji Arti A Tribute to Dilip Kumar