Informatics Practices

SQL Joins (Equi Join) MCQs | 25 Practice Questions with Answers | CBSE Class 12 Informatics Practices (IP)

Class 12 · Informatics Practices

SQL Joins (Equi Join) MCQs (25 Questions)

Practice these multiple-choice questions to strengthen your understanding of SQL Equi Joins. Click Show Answer to reveal the correct answer and explanation.


Q1. Why are SQL Joins used?

A. To create databases
B. To combine related data from two or more tables
C. To delete records
D. To rename columns

Show Answer

Answer: B. To combine related data from two or more tables

Explanation: Joins retrieve related information stored in different tables using a common field.


Q2. Which key is commonly used to relate two tables?

A. Candidate Key
B. Alternate Key
C. Foreign Key
D. Composite Key

Show Answer

Answer: C. Foreign Key

Explanation: A Foreign Key references the Primary Key of another table to establish a relationship.


Q3. An Equi Join is based on:

A. Greater than (>)
B. Less than (<)
C. Equality (=)
D. Not equal (!=)

Show Answer

Answer: C. Equality (=)

Explanation: An Equi Join matches rows where the values in the common columns are equal.


Q4. Which operator is used in an Equi Join condition?

A. >
B. =
C. =
D. !=

Show Answer

Answer: C. =

Explanation: The equality operator (=) is used in an Equi Join.


Q5. Which SQL clause specifies the join condition?

A. GROUP BY
B. ORDER BY
C. WHERE
D. HAVING

Show Answer

Answer: C. WHERE

Explanation: In the CBSE syllabus, an Equi Join is written using the WHERE clause with an equality condition.


Q6. Which query correctly joins the Student and Class tables using ClassID?

A. SELECT * FROM Student, Class WHERE Student.ClassID = Class.ClassID;
B. SELECT * FROM Student GROUP BY Class;
C. SELECT * FROM Student ORDER BY ClassID;
D. SELECT * FROM Student HAVING ClassID;

Show Answer

Answer: A.

Explanation: The common field ClassID is used with the equality operator to join both tables.


Q7. A Primary Key in one table usually becomes a ________ in another related table.

A. Candidate Key
B. Alternate Key
C. Foreign Key
D. Composite Key

Show Answer

Answer: C. Foreign Key

Explanation: The Foreign Key establishes the relationship between the two tables.


Q8. Which SQL statement retrieves all columns from two joined tables?

A. SELECT * FROM Table1, Table2 WHERE Table1.ID = Table2.ID;
B. SELECT Table1;
C. SHOW Table1, Table2;
D. DISPLAY Table1;

Show Answer

Answer: A.

Explanation: The query joins two tables using the common ID field.


Q9. Which type of SQL Join is included in the CBSE Class 12 IP syllabus?

A. Left Join
B. Right Join
C. Full Join
D. Equi Join

Show Answer

Answer: D. Equi Join

Explanation: The CBSE Class 12 Informatics Practices syllabus covers Equi Join.


Q10. Which statement about SQL Joins is TRUE?

A. Joins combine data from multiple tables.
B. Equi Join uses the equality operator.
C. Related tables are connected through common fields.
D. All of these.

Show Answer

Answer: D. All of these.

Explanation: SQL Joins retrieve related information from different tables using matching values.


Q11. Which field should be common in both tables for an Equi Join?

A. Any unrelated column
B. A common column containing matching values
C. Date column only
D. Text column only

Show Answer

Answer: B.

Explanation: An Equi Join requires a common field with matching values in both tables.


Q12. Which SQL clause lists the tables to be joined?

A. FROM
B. WHERE
C. GROUP BY
D. HAVING

Show Answer

Answer: A.

Explanation: The FROM clause specifies the tables participating in the join.


Q13. Which statement correctly describes a Foreign Key?

A. It uniquely identifies records in the same table.
B. It creates a relationship between two tables.
C. It stores duplicate values only.
D. It is always NULL.

Show Answer

Answer: B.

Explanation: A Foreign Key references the Primary Key of another table and establishes a relationship.


Q14. Which query joins the Employee and Department tables correctly?

A. SELECT * FROM Employee, Department WHERE Employee.DeptID = Department.DeptID;
B. SELECT * FROM Employee ORDER BY Department;
C. SELECT * FROM Employee GROUP BY DeptID;
D. SELECT * FROM Department HAVING DeptID;

Show Answer

Answer: A.

Explanation: The join condition compares the matching DeptID values in both tables.


Q15. Which statement is TRUE about Equi Joins?

A. They use the equality operator.
B. They combine related records.
C. They require a common field.
D. All of these.

Show Answer

Answer: D.

Explanation: Equi Joins use matching values in common fields to combine related records from multiple tables.



Q16. A school maintains two tables: Student(StudentID, Name, ClassID) and Class(ClassID, ClassName). Which SQL query displays the student name along with the class name?

A. SELECT Name, ClassName FROM Student, Class WHERE Student.ClassID = Class.ClassID;
B. SELECT Name FROM Student;
C. SELECT ClassName FROM Class;
D. SELECT * FROM Student GROUP BY ClassID;

Show Answer

Answer: A.

Explanation: The query joins both tables using the common ClassID field and displays the required information.


Q17. Which SQL clause is used to specify the condition for an Equi Join in the CBSE syllabus?

A. HAVING
B. ORDER BY
C. WHERE
D. GROUP BY

Show Answer

Answer: C. WHERE

Explanation: In CBSE Class 12 IP, Equi Joins are written using the WHERE clause with an equality condition.


Q18. Two tables have no matching values in the common column. What will an Equi Join return?

A. All rows from both tables
B. Only the first table
C. No matching rows
D. Duplicate rows

Show Answer

Answer: C. No matching rows

Explanation: An Equi Join returns only rows where the values in the common columns are equal.


Q19. Which statement correctly differentiates a Primary Key from a Foreign Key?

A. A Primary Key uniquely identifies records in a table.

B. A Foreign Key refers to the Primary Key of another table.

C. Both A and B.

D. Neither A nor B.

Show Answer

Answer: C. Both A and B.

Explanation: The Primary Key uniquely identifies records, while the Foreign Key establishes relationships between tables.


Q20. Which query correctly joins the Orders and Customer tables using CustomerID?

A. SELECT * FROM Orders, Customer WHERE Orders.CustomerID = Customer.CustomerID;
B. SELECT * FROM Orders GROUP BY CustomerID;
C. SELECT * FROM Customer ORDER BY CustomerID;
D. SELECT * FROM Orders HAVING CustomerID;

Show Answer

Answer: A.

Explanation: The query joins both tables by comparing the common CustomerID values.


Q21. Which of the following statements about Equi Join is TRUE?

A. It combines related records from two tables.

B. It requires a common column.

C. It uses the equality (=) operator.

D. All of these.

Show Answer

Answer: D. All of these.

Explanation: An Equi Join combines related records by comparing equal values in a common column.


Q22. A company stores employee details in one table and department details in another. Why is an Equi Join required?

A. To avoid creating multiple tables.

B. To combine related information stored in different tables.

C. To sort records.

D. To delete duplicate rows.

Show Answer

Answer: B.

Explanation: An Equi Join retrieves related data from multiple tables using a common field.


Q23. Which statement about SQL Joins is FALSE?

A. Equi Join compares equal values.

B. A Foreign Key helps establish relationships.

C. Every join uses the GROUP BY clause.

D. Related tables are connected using common fields.

Show Answer

Answer: C.

Explanation: GROUP BY is not required for joins. It is used for grouping records.


Q24. Which SQL statement correctly displays employee names along with department names?

A. SELECT Employee.Name, Department.DeptName FROM Employee, Department WHERE Employee.DeptID = Department.DeptID;
B. SELECT Name FROM Employee;
C. SELECT DeptName FROM Department;
D. SELECT * FROM Employee ORDER BY DeptID;

Show Answer

Answer: A.

Explanation: The query joins the Employee and Department tables using the common DeptID field.


Q25. Which statement best summarizes SQL Equi Joins?

A. They combine related data from multiple tables.

B. They use a common column and the equality operator.

C. They commonly involve Primary Keys and Foreign Keys.

D. All of these.

Show Answer

Answer: D. All of these.

Explanation: Equi Joins retrieve related data by matching equal values in common columns, often using Primary Key–Foreign Key relationships.


Answer Key

Q.No. Answer Q.No. Answer Q.No. Answer
1B11B21D
2C12A22B
3C13B23C
4C14A24A
5C15D25D
6A16A
7C17C
8A18C
9D19C
10D20A

Practice Tips

  • Remember the purpose of SQL Joins:
    • Combine related data from two or more tables.
    • Avoid duplication of data.
    • Retrieve meaningful information stored across multiple tables.
  • Understand the keys:
    • Primary Key → Uniquely identifies each record in a table.
    • Foreign Key → References the Primary Key of another table and creates a relationship.
  • Equi Join characteristics:
    • Uses the equality operator (=).
    • Requires a common column in both tables.
    • Returns only matching records.
  • CBSE Equi Join syntax: ```sql SELECT column_list FROM Table1, Table2 WHERE Table1.CommonColumn = Table2.CommonColumn; ```
  • Common real-life examples:
    • Student ↔ Class
    • Employee ↔ Department
    • Customer ↔ Orders
    • Book ↔ Publisher
    • Product ↔ Supplier
  • CBSE Tip: In competency-based questions, identify the common column (usually a Primary Key and its corresponding Foreign Key) before writing the join condition. This helps you construct the correct Equi Join query.