Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

NAME: Muzammil Shah

ID: 13854
PROGRAM: BS (SE)
SECTION: S-D
COURSE: DATABASE SYSTEM (LAB)
TEACHER: SIR TANVEER MALIK

Full Join and Self Join in SQL:


Creating tables for full join and self-join:
What is a Full Join?
A full join, also known as a full outer join, returns all records when there is a match in either the left or
right table. It returns all rows from both tables, with NULL values in the columns where there are no
matches.

The FULL JOIN syntax is not supported in MySQL, which is what you seem to be using. Instead, you can
use a LEFT JOIN and a RIGHT JOIN to achieve the same result. Here's how you can modify the query to
work in MySQL:
What is a Self-Join?
A self-join is a type of join where a table is joined with itself. It is used to compare rows within the same
table.

You might also like