For the given table 'STUDENT':
S_id NAME STREAM MARKS SECTION 1 Ashu Science 90 A 2 Ajay English 80 B 3 Richa History 85 C 4 Rajeev Science 79 A 5 Arun Science 88 B 6 Ruchi English 78 C
What will be the command to select information of all Science students from the table 'STUDENT'?
For the given table 'STUDENT':
| S_id | NAME | STREAM | MARKS | SECTION |
|---|---|---|---|---|
| 1 | Ashu | Science | 90 | A |
| 2 | Ajay | English | 80 | B |
| 3 | Richa | History | 85 | C |
| 4 | Rajeev | Science | 79 | A |
| 5 | Arun | Science | 88 | B |
| 6 | Ruchi | English | 78 | C |
What will be the command to select information of all Science students from the table 'STUDENT'?
Solution
SELECT * returns all columns, and WHERE STREAM = 'Science' keeps only the rows whose STREAM is Science. Together they give the complete information (S_id, NAME, STREAM, MARKS, SECTION) of Ashu, Rajeev and Arun.
Option 1: no WHERE clause, so it returns all 6 students, not just Science.
Option 2: it returns only the STREAM column, not all the information, and the string 'Science is missing its closing quote.
Option 4: it filters correctly but returns only the NAME column, not the full details.
Related questions:
2025: 15 May Shift 2
2025: 14 May Shift 1
2025: 21 May Shift 1
2025: 3 June Shift 2