
Concept Notes – Joins in DBMS
In DBMS, JOIN is used to combine data from two or more tables based on a related column (usually a primary key–foreign key relationship).
⚙️ Types of Joins
1️⃣ INNER JOIN
- Returns only the rows that have matching values in both tables.
- Example: Students and Marks tables – only students who have marks will be displayed.
SQL Example:
SELECT Students.RollNo, Students.Name, Marks.Subject, Marks.Score
FROM Students
INNER JOIN Marks
ON Students.RollNo = Marks.RollNo;
Only students with matching records in both tables appear.
2️⃣ OUTER JOIN
- Returns all records from one table and the matched records from the other table.
- If no match is found, NULL is shown.
There are three types:
- LEFT OUTER JOIN → All rows from the left table + matched rows from right table.
- RIGHT OUTER JOIN → All rows from the right table + matched rows from left table.
- FULL OUTER JOIN → All rows from both tables, with NULL where no match exists.
SQL Example (LEFT JOIN):
SELECT Students.RollNo, Students.Name, Marks.Subject, Marks.Score
FROM Students
LEFT JOIN Marks
ON Students.RollNo = Marks.RollNo;
All students are shown, even those who don’t have marks (with NULL for missing data).
💡 Comparison Table – INNER vs OUTER JOIN
Feature | INNER JOIN | OUTER JOIN |
---|---|---|
Records Returned | Only matching rows | Matching + Non-matching rows |
NULL Handling | Excluded | Included where no match |
Types | Single type | Left, Right, Full |
Example | Students with marks only | All students, even without marks |
🔟 10 Most Expected MCQs – ECET 2026 [DBMS Joins]
Q1. Which join returns only matching rows from both tables?
A) LEFT JOIN
B) INNER JOIN
C) RIGHT JOIN
D) FULL JOIN
Q2. Which join returns all rows from the left table, and matched rows from the right?
A) INNER JOIN
B) LEFT JOIN
C) FULL JOIN
D) RIGHT JOIN
Q3. If no match is found, which join shows NULL values?
A) INNER JOIN
B) OUTER JOIN
C) CROSS JOIN
D) SELF JOIN
Q4. In which join do unmatched rows get eliminated?
A) INNER JOIN
B) LEFT JOIN
C) FULL JOIN
D) RIGHT JOIN
Q5. FULL OUTER JOIN = ?
A) INNER + LEFT JOIN
B) LEFT + RIGHT JOIN
C) INNER + CROSS JOIN
D) None
Q6. Which join guarantees all rows from both tables appear at least once?
A) INNER JOIN
B) LEFT JOIN
C) FULL OUTER JOIN
D) RIGHT JOIN
Q7. LEFT OUTER JOIN is also called:
A) RIGHT JOIN
B) LEFT JOIN
C) INNER JOIN
D) CROSS JOIN
Q8. If you want all employees listed even if they have no department, you use:
A) INNER JOIN
B) RIGHT JOIN
C) LEFT JOIN
D) FULL OUTER JOIN
Q9. Which join may result in maximum NULL values?
A) INNER JOIN
B) FULL OUTER JOIN
C) LEFT JOIN
D) RIGHT JOIN
Q10. By default, JOIN in SQL means:
A) OUTER JOIN
B) INNER JOIN
C) CROSS JOIN
D) NATURAL JOIN
✅ Answer Key (WordPress Table Format)
Q.No | Answer |
---|---|
Q1 | B |
Q2 | B |
Q3 | B |
Q4 | A |
Q5 | B |
Q6 | C |
Q7 | B |
Q8 | C |
Q9 | B |
Q10 | B |
🧠 Explanations of All Answers
- Q1 → B: INNER JOIN returns only matching rows.
- Q2 → B: LEFT JOIN keeps all rows from the left table.
- Q3 → B: OUTER JOIN displays NULL for unmatched values.
- Q4 → A: INNER JOIN eliminates non-matching rows.
- Q5 → B: FULL OUTER JOIN = LEFT + RIGHT JOIN.
- Q6 → C: FULL OUTER JOIN shows all rows from both tables.
- Q7 → B: LEFT OUTER JOIN is same as LEFT JOIN.
- Q8 → C: LEFT JOIN ensures all employees are shown, even without dept.
- Q9 → B: FULL OUTER JOIN may create many NULL values.
- Q10 → B: Default JOIN = INNER JOIN in SQL.
🎯 Why This Practice Matters for ECET 2026
- DBMS joins are repeatedly asked in ECET exams.
- At least 1–2 MCQs come directly from INNER JOIN vs OUTER JOIN.
- Mastering joins helps in SQL programming, interviews, and real-time database handling.
📲 Join Our ECET Prep Community on Telegram
👉 For daily MCQs, notes, and video sessions: @LearnNewThingsHub