SQL INNER JOIN vs LEFT JOIN vs RIGHT JOIN vs FULL OUTER JOIN: Differences With Examples (Tested in MySQL 8.4 and SQLite)
INNER JOIN keeps only matching rows, LEFT JOIN keeps every row from the left table, RIGHT JOIN keeps every row from the right table, and FULL OUTER JOIN keeps everything. Here's each one run on the same two tables in MySQL 8.4 and SQLite, with real output.