Grokking SQL for Tech Interviews
Vote

0% completed

FULL OUTER JOIN

A FULL OUTER JOIN in SQL is a type of join that combines rows from two or more tables based on a specified condition, and includes all rows from both the left (or first) and right (or second) tables. If there is no match, NULL values are filled in for columns from the table where no match is found.

My SQL Doesn't support Full Outer Join directly. So, we need to perform the left join and right join on two tables and then union their result.

Syntax

Follow the syntax below to perform the full outer join using the left join, right join and union.

SELECT * FROM table1 t1

.....

.....

.....

Like the course? Get enrolled and start learning!
Hasnain Zeeshan

Hasnain Zeeshan

· 2 years ago

I'm getting the following error when I run the test case

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OUTER JOIN Grades ON Students.student_id = Grades.student_id' at line 3

Reading Progress

0%