</>
Skip to content
SQL lessons (28/54)

SQL — Full Join

Basic INNER JOIN

SELECT users.name, orders.total
FROM users
INNER JOIN orders ON users.id = orders.user_id;

With table aliases

SELECT u.name, o.total
FROM users u
INNER JOIN orders o ON u.id = o.user_id;

Multiple joins

SELECT u.name, o.total, p.name AS product
FROM users u
INNER JOIN orders o ON u.id = o.user_id
INNER JOIN products p ON o.product_id = p.id;

INNER JOIN with WHERE

SELECT u.name, o.total
FROM users u
INNER JOIN orders o ON u.id = o.user_id
WHERE o.total > 100;

Self join

SELECT e.name AS employee, m.name AS manager
FROM employees e
INNER JOIN employees m ON e.manager_id = m.id;

Mini Practice

  1. Join two tables
  2. Use table aliases
  3. Join multiple tables
  4. Filter joined results

Up Next

Continue with Left Join - Left join operations.

Related Topics

Frequently Asked Questions about Full Join

What is Full Join in SQL?

Full Join is a fundamental concept in SQL. This lesson explains it step by step with clear examples, making it easy for beginners to understand.

How do I learn Full Join?

Start by reading the explanation above, then try the code examples. Practice by modifying the examples and experimenting with different values. Hands-on practice is the best way to learn Full Join.

Why is Full Join important in SQL?

Full Join is essential for SQL development. Understanding this concept will help you write better code and solve real-world problems more effectively.