Hackforge Academy

Category: React • Beginner

Published on 24 Feb 2026

Explanation

#white-INNER JOIN returns matching records from both tables.

Code Example

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

Explanation

#white-LEFT JOIN returns all records from left #white-table and matched records from right table.

Code Example

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

Explanation

#white-RIGHT JOIN returns all records from right #white-table and matched records from left table.

Code Example

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

Explanation

#white-JOIN using alias improves readability.

Code Example

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

Explanation

#white-JOIN with WHERE condition filters combined results.

Code Example

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

Want structured learning with real projects?

Join our Weekend Live Workshop and become job-ready faster.