Database Fundamentals — Question 16
You need to retrieve data from two related database tables based on a column that exists in both tables.
Which command should you use in a query?
Answer options
- A. INTERSECT
- B. UNION
- C. JOIN
- D. TRUNCATE
Correct answer: C
Explanation
The correct answer is C, JOIN, because it is specifically designed to combine rows from two or more tables based on a related column. The other options do not serve this purpose: A (INTERSECT) finds common rows between two queries, B (UNION) combines results from two queries without regard to relationships, and D (TRUNCATE) is used to delete all records from a table.