Using JOIN, which of the following MySQL query is almost equivalent to: SELECT…

2023

Using JOIN, which of the following MySQL query is almost equivalent to: SELECT NAME, MARKS FROM STUDENT, RESULT WHERE STUDENT.ROLL = RESULT.ROLL;

  1. A.

    SELECT NAME, MARKS FROM STUDENT JOIN RESULT;

  2. B.

    SELECT NAME, MARKS FROM STUDENT EQUI JOIN RESULT;

  3. C.

    SELECT NAME, MARKS FROM STUDENT NATURAL JOIN RESULT;

  4. D.

    SELECT NAME, MARKS FROM STUDENT, RESULT;

Attempted by 1430 students.

Show answer & explanation

Correct answer: C

Correct equivalent using JOIN: SELECT NAME, MARKS FROM STUDENT JOIN RESULT ON STUDENT.ROLL = RESULT.ROLL; Explanation: The original query uses an implicit inner join by listing both tables and putting the equality condition in the WHERE clause. That is equivalent to an explicit INNER JOIN (or JOIN) with an ON clause that specifies the equality.

Explore the full course: Up Lt Grade Assistant Teacher 2025