Over 10 years we helping companies reach their financial and branding goals. Onum is a values-driven SEO agency dedicated.

CONTACTS
ECET 2026 CSE

Day 49 – Evening Session: DBMS – SQL Joins Practice (Examples) – ECET 2026

In DBMS, SQL Joins are frequently asked in ECET exams. They are important for solving queries that combine data from multiple tables. This topic guarantees scoring questions, especially with examples.


📘 Concept Notes – SQL Joins

🌐 What are SQL Joins?

A Join in SQL is used to combine rows from two or more tables, based on a related column between them.


⚙️ Types of Joins

  1. INNER JOIN
    • Returns only the matching rows between two tables.
SELECT S.name, M.marks
FROM Students S
INNER JOIN Marks M ON S.id = M.student_id;
  1. LEFT JOIN (LEFT OUTER JOIN)
    • Returns all rows from the left table + matching rows from right.Non-matching rows from right appear as NULL.
SELECT S.name, M.marks
FROM Students S
LEFT JOIN Marks M ON S.id = M.student_id;
  1. RIGHT JOIN (RIGHT OUTER JOIN)
    • Returns all rows from right table + matching rows from left.
SELECT S.name, M.marks
FROM Students S
RIGHT JOIN Marks M ON S.id = M.student_id;
  1. FULL OUTER JOIN
    • Returns all rows when there is a match in either left or right.Non-matching rows will contain NULL.
SELECT S.name, M.marks
FROM Students S
FULL OUTER JOIN Marks M ON S.id = M.student_id;
  1. CROSS JOIN
    • Produces Cartesian Product of two tables.If Table A has  m rows and Table B has  n rows → result =  m \times n rows.
SELECT S.name, C.course
FROM Students S
CROSS JOIN Courses C;

🔋 Formula

If:

  • Table A has  m rows
  • Table B has  n rows

Then result of CROSS JOIN =  m \times n rows.


📐 Example

Students Table

idname
1Ravi
2Neha

Marks Table

student_idmarks
180
290
375
  • INNER JOIN → returns Ravi (80), Neha (90).
  • LEFT JOIN → returns Ravi (80), Neha (90), plus unmatched rows from Students if any.
  • RIGHT JOIN → returns Ravi (80), Neha (90), plus student_id=3 with NULL name.
  • FULL OUTER JOIN → Ravi (80), Neha (90), student_id=3 with NULL name.

🔟 10 Expected MCQs – ECET 2026

Q1. Which SQL Join returns only matching rows between two tables?
A) INNER JOIN
B) LEFT JOIN
C) RIGHT JOIN
D) FULL JOIN

Q2. If Table A has 4 rows, Table B has 5 rows, CROSS JOIN result = ?
A) 9
B) 20
C) 10
D) 25

Q3. In LEFT JOIN, unmatched rows from right table appear as:
A) 0
B) NULL
C) Empty string
D) Duplicate

Q4. Which Join returns all rows from right table + matched rows from left?
A) LEFT JOIN
B) RIGHT JOIN
C) FULL OUTER JOIN
D) CROSS JOIN

Q5. Which SQL Join is not supported directly in MySQL?
A) INNER JOIN
B) LEFT JOIN
C) RIGHT JOIN
D) FULL OUTER JOIN

Q6. If Students=10 rows, Courses=6 rows → CROSS JOIN result = ?
A) 16
B) 60
C) 600
D) 100

Q7. FULL OUTER JOIN returns:
A) Only matching rows
B) All rows from both tables
C) Only left table rows
D) Only right table rows

Q8. INNER JOIN is equivalent to:
A) INTERSECTION of tables
B) UNION of tables
C) Cartesian Product
D) Subtraction

Q9. Which Join ensures no NULLs appear?
A) INNER JOIN
B) LEFT JOIN
C) RIGHT JOIN
D) FULL OUTER JOIN

Q10. For CROSS JOIN formula, result rows = ?
A)  m+n
B)  m-n
C)  m \times n
D)  m/n


✅ Answer Key

Q.NoAnswer
Q1A
Q2B
Q3B
Q4B
Q5D
Q6B
Q7B
Q8A
Q9A
Q10C

🧠 Explanations

  • Q1 → A: INNER JOIN gives only common rows.
  • Q2 → B:  4 \times 5 = 20 .
  • Q3 → B: Missing values are represented as NULL.
  • Q4 → B: RIGHT JOIN = all right + matched left.
  • Q5 → D: FULL OUTER JOIN not directly in MySQL.
  • Q6 → B:  10 \times 6 = 60 .
  • Q7 → B: FULL OUTER JOIN = all rows from both.
  • Q8 → A: INNER JOIN ≈ INTERSECTION.
  • Q9 → A: INNER JOIN avoids NULLs.
  • Q10 → C: CROSS JOIN result =  m \times n .

🎯 Why Practice Matters

  • SQL Joins are highly scoring in DBMS.
  • ECET papers often ask direct JOIN queries.
  • Practicing with formulas + examples makes problem solving easier.

📲 Join Our ECET Prep Community on WhatsApp

👉 Join WhatsApp Group – Click Here

Leave a comment

Your email address will not be published. Required fields are marked *