
SQL Joins MCQs
Quiz
•
Other
•
Professional Development
•
Practice Problem
•
Hard
Dinesh Kumar
Used 1+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which join type is used to fetch only the records that have matching entries in both Orders and Manager tables based on region?
SQL:
SELECT O.OrderID, O.Region, O.Sales, M.Manager
FROM Orders O
INNER JOIN Manager M ON O.Region = M.Region;
LEFT JOIN
RIGHT JOIN
INNER JOIN
FULL OUTER JOIN
Answer explanation
The INNER JOIN is used to fetch records that have matching entries in both the Orders and Manager tables based on the region. It only returns rows where there is a match in both tables.
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which join ensures that all records from the Orders table appear even if no matching Manager is found?
SQL:
SELECT O.OrderID, O.Region, O.Sales, M.Manager
FROM Orders O
LEFT JOIN Manager M ON O.Region = M.Region;
LEFT JOIN
INNER JOIN
FULL OUTER JOIN
CROSS JOIN
Answer explanation
The LEFT JOIN ensures that all records from the Orders table are included in the result, even if there are no matching records in the Manager table. This is why LEFT JOIN is the correct choice.
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which query finds orders without an assigned manager?
SQL:
SELECT O.OrderID, O.Region, O.Sales
FROM Orders O
LEFT JOIN Manager M ON O.Region = M.Region
WHERE M.Manager IS NULL;
INNER JOIN with NULL
LEFT JOIN with NULL filter
RIGHT JOIN
CROSS JOIN
Answer explanation
The query uses a LEFT JOIN to include all orders, even those without a matching manager. The WHERE clause filters for rows where M.Manager is NULL, indicating no assigned manager, making 'LEFT JOIN with NULL filter' the correct choice.
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which query fetches orders that have been returned?
SQL:
SELECT O.OrderID, O.Sales, R.Returned
FROM Orders O
INNER JOIN Returns R ON O.OrderID = R.OrderID
WHERE R.Returned = 'Yes';
FULL OUTER JOIN
RIGHT JOIN
INNER JOIN
LEFT JOIN
Answer explanation
The query uses INNER JOIN to fetch orders that have been returned. This join type ensures only orders with matching records in the Returns table (where Returned = 'Yes') are selected, making it the correct choice.
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which query lists all orders that were not returned at all?
SQL:
SELECT O.OrderID, O.Sales, R.Returned
FROM Orders O
LEFT JOIN Returns R ON O.OrderID = R.OrderID
WHERE R.Returned IS NULL;
LEFT JOIN with NULL filter
INNER JOIN
RIGHT JOIN
FULL JOIN
Answer explanation
The query uses a LEFT JOIN to include all orders, even those without corresponding returns. The filter 'R.Returned IS NULL' ensures only orders that were not returned are listed, making 'LEFT JOIN with NULL filter' the correct choice.
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which join returns all records from the Returns table even if the Order does not exist?
SQL:
SELECT R.OrderID, O.Sales
FROM Returns R
RIGHT JOIN Orders O ON O.OrderID = R.OrderID;
LEFT JOIN
RIGHT JOIN
CROSS JOIN
INNER JOIN
Answer explanation
The RIGHT JOIN returns all records from the Orders table, including those without matching records in the Returns table. Thus, it ensures all Orders are displayed, even if there are no corresponding Returns.
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Which query uses FULL OUTER JOIN to combine Orders and Returns?
SQL:
SELECT O.OrderID, O.Sales, R.Returned
FROM Orders O
FULL OUTER JOIN Returns R ON O.OrderID = R.OrderID;
INNER JOIN
RIGHT JOIN
FULL OUTER JOIN
SELF JOIN
Answer explanation
The query uses FULL OUTER JOIN to combine Orders and Returns, allowing for all records from both tables. This is evident in the SQL statement where 'FULL OUTER JOIN' is explicitly stated.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
Kuis Booklet Fasil KRM 2024
Quiz
•
Professional Development
11 questions
Saptama de Rugaciune a Tineretului
Quiz
•
Professional Development
20 questions
Qüestionari repàs UD 2
Quiz
•
Professional Development
20 questions
Capacitación Calidad Fideería
Quiz
•
Professional Development
20 questions
Análise do The Messy Middle
Quiz
•
Professional Development
13 questions
ENFOQUE POR COMPETENCIAS.
Quiz
•
Professional Development
10 questions
GAIA - TRIVIA QUIZ 1
Quiz
•
Professional Development
10 questions
BOS FCC Townhall Quiz
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
