SQL Inner Join
1.What does INNER JOIN do?
-
A. Returns unmatched rows from both tables
-
B. Returns only matched rows between tables
-
C. Returns all rows from both tables
-
D. Only returns NULL values
Returns only matched rows between tables
Returns only matched rows between tables
2.Which clause is used with INNER JOIN to match rows?
-
A. WHERE
-
B. ON
-
C. USING
-
D. MATCH
ON
ON
3.INNER JOIN is equivalent to:
-
A. OUTER JOIN
-
B. CROSS JOIN
-
C. JOIN
-
D. RIGHT JOIN
JOIN
JOIN
4.What happens when there is no match in INNER JOIN?
-
A. NULL returned
-
B. Row is skipped
-
C. Row is included anyway
-
D. 0 returned
Row is skipped
Row is skipped
5.Which of the following is correct syntax?
-
A. SELECT * FROM A INNER JOIN B ON A.id = B.id;
-
B. SELECT * FROM A JOIN B WHERE A.id = B.id;
-
C. SELECT * FROM A, B WHERE A.id = B.id;
-
D. All of the above
All of the above
All of the above