Multiple choice technology databases

What is the result of the query below? SELECT Stud_name, Rollnum FROM STUDENT WHERE stud_marks=(SELECT MIN (stud_marks) FROM STUDENT GROUPBY Rollnum);

  1. It gives the name and marks of all the students.

  2. It does not return anything.

  3. It shows an error saying” INVALID SYNTAX ERROR”

  4. It shows an error saying” Single-row subquery returns more than one row

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The subquery uses GROUP BY Rollnum, which returns one row per unique Rollnum (multiple rows total). The outer query uses = (single-row operator), which cannot handle multiple results. This triggers the error 'single-row subquery returns more than one row'. Note: GROUPBY should be GROUP BY (missing space).

AI explanation

The subquery SELECT MIN(stud_marks) FROM STUDENT GROUP BY Rollnum returns one minimum value per distinct Rollnum group — meaning it can return many rows, not a single value. Since the outer query compares stud_marks = against this subquery using a single-row equality operator, Oracle raises the classic "single-row subquery returns more than one row" error whenever the grouped subquery yields more than one row.