UNION, INTERSECT & EXCEPT · Question 3 · Easy

Table Cricket: student Aman Bina Chetan Bina Table Football: student Bina Divya Aman Which names does this INTERSECT query return?

SELECT student FROM Cricket
INTERSECT
SELECT student FROM Football
ORDER BY student;
  1. Aman; Bina; Bina
  2. Chetan; Divya
  3. Aman; Bina
  4. Aman; Bina; Chetan; Divya
Answer and explanation

Answer: C. Aman; Bina

Explanation: INTERSECT keeps only the rows that appear in both results and returns each of them once. Aman and Bina are in both tables; Chetan plays only cricket and Divya only football.

Previous: Table Cricket: student Aman Bina Chetan Bina Table Football: student Bina… · Next: Table Cricket: student Aman Bina Chetan Bina Table Football: student Bina…

Practise union, intersect & except

Try a fresh set of union, intersect & except questions with an explanation after every answer, free and without signing up: UNION, INTERSECT & EXCEPT practice. Or sit a full placement mock test.

More union, intersect & except questions

More sql practice

Tables, Keys & Constraints · DML & Transactions · SELECT, WHERE & ORDER BY · SQL Joins · Aggregates & GROUP BY · Subqueries & CTEs · Window Functions · NULL Handling

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge