Multiple choice

Consider the following two tables:

Student:

|Student_ID|Name| |---|---| |101|Ajit| |102|Ranjit| |103|Virat| |104|Suresh| |105|Gagan|

Mark:

|Student_ID|Total_marks| |---|---| |101|95| |102|91| |103|80| |104|74| |105|69|

Display the students which have marks more than 80.

  1. SELECT a.student_id, a.name, b.total_marks FROM student a, marks b WHERE a.student_id = b.student_id AND total_marks >80;

  2. SELECT a.student_id, a.name, b.total_marks FROM student a, marks b WHERE a.student_id = b.student_id AND a.total_marks >80;

  3. SELECT a.student_id, a.name, b.total_marks FROM student a, marks b WHERE a.student_id = b.student_id AND b.total_marks >80;

  4. SELECT a.student_id, a.name, b.student_id, b.total_marks FROM student a, marks b WHERE a.student_id = b.student_id AND a.total_marks >80;

  5. None of the above

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

This is a correct query as we are joining the two tables to match their Ids and then displaying the desired result.