wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SQL Joins Quiz

Total questions: 30

Worksheet time: 15mins

Name
Class
Date
1.

Which SQL join returns only the rows that have matching values in both tables?

a)

LEFT JOIN

b)

INNER JOIN

c)

RIGHT JOIN

d)

FULL JOIN

2.

Which join includes all rows from the left table and the matched rows from the right table?

a)

INNER JOIN

b)

LEFT JOIN

c)

RIGHT JOIN

d)

CROSS JOIN

3.

Which join returns all rows from the right table and the matched rows from the left table?

a)

RIGHT JOIN

b)

INNER JOIN

c)

LEFT JOIN

d)

FULL JOIN

4.

Which join returns all rows when there is a match in either left or right table?

a)

INNER JOIN

b)

FULL JOIN

c)

CROSS JOIN

d)

NATURAL JOIN

5.

Which SQL join produces the Cartesian product of two tables?

a)

LEFT JOIN

b)

RIGHT JOIN

c)

CROSS JOIN

d)

FULL JOIN

6.

Which join matches rows automatically based on columns with the same name in both tables?

a)

NATURAL JOIN

b)

INNER JOIN

c)

CROSS JOIN

d)

SELF JOIN

7.

A join in which a table is joined with itself is called?

a)

INNER JOIN

b)

NATURAL JOIN

c)

SELF JOIN

d)

CROSS JOIN

8.

In an INNER JOIN, if one table has 10 rows and another has 15 rows, the maximum result set can be:

a)

25

b)

150

c)

15

d)

10

9.

Which join can result in NULL values in the output?

a)

INNER JOIN

b)

CROSS JOIN

c)

OUTER JOIN

d)

SELF JOIN

10.

LEFT JOIN is also known as:

a)

Left Outer Join

b)

Left Inner Join

c)

Full Left Join

d)

Semi Join

11.

Which join ensures that unmatched rows from both tables appear in the result?

a)

INNER JOIN

b)

LEFT JOIN

c)

RIGHT JOIN

d)

FULL JOIN

12.

If you want to get all students even if they are not enrolled in any course, which join should you use between Students and Enrollments?

a)

INNER JOIN

b)

LEFT JOIN

c)

RIGHT JOIN

d)

FULL JOIN

13.

Which join duplicates rows when there are multiple matching rows?

a)

CROSS JOIN

b)

INNER JOIN

c)

SELF JOIN

d)

All of the above

14.

Which SQL clause is always required in INNER JOIN?

a)

WHERE

b)

ON

c)

HAVING

d)

GROUP BY

15.

A join that returns rows that do not have matching rows in another table is called?

a)

Semi Join

b)

Anti Join

c)

Cross Join

d)

Natural Join

16.

Which of the following joins is not explicitly supported in SQL but can be simulated using NOT EXISTS or NOT IN?

a)

INNER JOIN

b)

LEFT JOIN

c)

FULL JOIN

d)

ANTI JOIN

17.

Which join is best to find employees who have no department assigned?

a)

INNER JOIN

b)

LEFT JOIN with NULL check

c)

RIGHT JOIN with NULL check

d)

FULL JOIN with NULL check

18.

Which join returns rows when at least one table has a match?

a)

INNER JOIN

b)

FULL OUTER JOIN

c)

CROSS JOIN

d)

NATURAL JOIN

19.

In SQL, a CROSS JOIN without a WHERE clause gives:

a)

Same as INNER JOIN

b)

Cartesian product

c)

Only matched rows

d)

NULL values

20.

A join that combines rows from two tables based on a condition is called:

a)

Equi Join

b)

Natural Join

c)

Cross Join

d)

Self Join

21.

Which join uses equality operator (=) in join condition?

a)

Equi Join

b)

Non-Equi Join

c)

Outer Join

d)

Cross Join

22.

Which join uses inequality operators like , =?

a)

Equi Join

b)

Non-Equi Join

c)

Outer Join

d)

Inner Join

23.

If Table A has 5 rows and Table B has 4 rows, CROSS JOIN will return:

a)

9 rows

b)

20 rows

c)

5 rows

d)

4 rows

24.

Which join type can be replaced by UNION of LEFT JOIN and RIGHT JOIN?

a)

INNER JOIN

b)

FULL OUTER JOIN

c)

CROSS JOIN

d)

NATURAL JOIN

25.

Which join is used when a table references itself through a foreign key?

a)

NATURAL JOIN

b)

SELF JOIN

c)

INNER JOIN

d)

CROSS JOIN

26.

Which SQL join is most likely to be slowest with very large tables?

a)

INNER JOIN

b)

OUTER JOIN

c)

CROSS JOIN

d)

SELF JOIN

27.

Which join includes NULLs from both sides of the tables?

a)

INNER JOIN

b)

FULL OUTER JOIN

c)

CROSS JOIN

d)

NATURAL JOIN

28.

Which join produces fewer rows than CROSS JOIN but more than INNER JOIN?

a)

FULL OUTER JOIN

b)

LEFT JOIN

c)

RIGHT JOIN

d)

None of the above

29.

To join three tables together, you should use:

a)

Multiple JOIN clauses

b)

UNION

c)

CROSS JOIN only

d)

NATURAL JOIN only

30.

Which join is best to use if you need all possible combinations between two tables?

a)

INNER JOIN

b)

CROSS JOIN

c)

FULL OUTER JOIN

d)

SELF JOIN