Medium1 markMultiple Choice
Area I: Information SystemsData ManagementSQLJoins

CPA · Question 71 · Area I: Information Systems

An auditor is reviewing a SQL query that joins two tables: 'Customers' and 'Orders'. The query uses an 'INNER JOIN'. Which records will be included in the result?

Answer options:

A.

All customers, even if they have no orders.

B.

All orders, even if they have no customer.

C.

Only records where there is a match in BOTH tables.

D.

All records from both tables, regardless of matches.

How to approach this question

Inner = Intersection (Both). Left = All Left + Matching Right. Right = All Right + Matching Left.

Full Answer

C.Only records where there is a match in BOTH tables.✓ Correct
An INNER JOIN returns records that have matching values in both tables. If a customer has no orders, they are excluded. If an order has no customer, it is excluded.

Common mistakes

Confusing Inner with Left/Outer joins.

Practice the full CPA ISC Practice Exam

82 questions · hints · full answers · grading

More questions from this exam