Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 7 - DQL (Data Query Language)
Lesson Content Link:LEFT JOIN
Current Quiz Count:45
Progress
0%
Q1
True / False

A LEFT JOIN returns all records from the left table and the matched records from the right table.

Q2
True / False

In a LEFT JOIN, if no match is found, the result is NULL from the right table.

Q3
True / False

LEFT JOIN can be used to find unmatched records in the right table.

Q4
True / False

LEFT JOIN is also known as LEFT OUTER JOIN.

Q5
True / False

In a LEFT JOIN, the result set includes only the rows that have matching values in both tables.

Q6
True / False

Using LEFT JOIN, it is possible to retrieve rows from the right table even if there are no corresponding rows in the left table.

Q7
True / False

The LEFT JOIN statement will return more rows than the INNER JOIN statement if there are unmatched rows in the left table.

Q8
True / False

In a LEFT JOIN, the result set will include NULLs in the columns of the left table if there is no match.

Q9
True / False

Using LEFT JOIN can help identify rows in the left table that do not have corresponding rows in the right table.

Q10
True / False

LEFT JOIN always returns the same number of rows as the left table.

Q11
True / False

LEFT JOIN will return NULL for all columns of the right table if there is no match for a row in the left table.

Q12
True / False

LEFT JOIN can be used to find rows in the left table that do not have corresponding rows in the right table by filtering for NULL values in the right table columns.

Q13
True / False

The result of a LEFT JOIN will be empty if there are no matching rows in the right table.

Q14
True / False

In a LEFT JOIN, the result set will include rows from the left table even if there are no corresponding rows in the right table.

Q15
True / False

LEFT JOIN is used when we want to return all records from the right table and the matched records from the left table.

Q16
Single Choice

Which SQL statement correctly performs a LEFT JOIN between the Customers and Orders tables?

SQL Code
SELECT Customers.CustomerID, Orders.OrderID
FROM Customers
LEFT JOIN Orders
ON Customers.CustomerID = Orders.CustomerID;
Q17
Single Choice

What is the result of the following query if there are no matching rows in the Orders table? SELECT Customers.CustomerID, Orders.OrderID FROM Customers LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID;

Q18
Single Choice

Which of the following is true about LEFT JOIN?

Q19
Single Choice

What does the LEFT JOIN keyword do?

Q20
Single Choice

Which JOIN clause will retrieve all rows from the Employees table and only matching rows from the Departments table?

Q21
Single Choice

Which SQL statement correctly performs a LEFT JOIN between the Products and Categories tables?

SQL Code
SELECT Products.ProductName, Categories.CategoryName
FROM Products
LEFT JOIN Categories
ON Products.CategoryID = Categories.CategoryID;
Q22
Single Choice

In a LEFT JOIN, what happens to the result if there are no matching rows in the right table?

Q23
Single Choice

Which of the following queries uses LEFT JOIN to retrieve all students and their courses?

SQL Code
SELECT Students.StudentName, Courses.CourseName
FROM Students
LEFT JOIN Courses
ON Students.CourseID = Courses.CourseID;
Q24
Single Choice

What does the following query do? SELECT A.Name, B.Age FROM TableA A LEFT JOIN TableB B ON A.ID = B.ID;

Q25
Single Choice

Which JOIN type is most suitable for retrieving all rows from Table1 and matching rows from Table2?

Q26
Single Choice

What does the LEFT JOIN statement do in the following query? SELECT Employees.Name, Salaries.Amount FROM Employees LEFT JOIN Salaries ON Employees.ID = Salaries.ID;

Q27
Single Choice

Which of the following is a correct LEFT JOIN syntax?

SQL Code
SELECT A.Col1, B.Col2
FROM TableA A
LEFT JOIN TableB B
ON A.Key = B.Key;
Q28
Single Choice

How does LEFT JOIN handle non-matching rows in the right table?

Q29
Single Choice

What will be the result of a LEFT JOIN if there are no matching rows in both tables?

Q30
Single Choice

What is the purpose of using LEFT JOIN in the following query? SELECT A.Col1, B.Col2 FROM TableA A LEFT JOIN TableB B ON A.ID = B.ID;

Q31
Multiple Choice

Which of the following queries will return all employees and their department names?

SQL Code
SELECT Employees.EmployeeName, Departments.DepartmentName
FROM Employees
LEFT JOIN Departments
ON Employees.DepartmentID = Departments.DepartmentID;
Q32
Multiple Choice

Which of the following will include all products and their categories?

SQL Code
SELECT Products.ProductName, Categories.CategoryName
FROM Products
LEFT JOIN Categories
ON Products.CategoryID = Categories.CategoryID;
Q33
Multiple Choice

Identify the queries that will return all books and their authors.

SQL Code
SELECT Books.BookTitle, Authors.AuthorName
FROM Books
LEFT JOIN Authors
ON Books.AuthorID = Authors.AuthorID;
Q34
Multiple Choice

Select the queries that correctly use LEFT JOIN to retrieve all students and their grades.

SQL Code
SELECT Students.StudentName, Grades.Grade
FROM Students
LEFT JOIN Grades
ON Students.StudentID = Grades.StudentID;
Q35
Multiple Choice

Which queries will retrieve all orders and their shipment details?

SQL Code
SELECT Orders.OrderID, Shipments.ShipmentDate
FROM Orders
LEFT JOIN Shipments
ON Orders.ShipmentID = Shipments.ShipmentID;
Q36
Multiple Choice

What is the purpose of the LEFT JOIN clause in this query? SELECT Employees.EmployeeName, Departments.DepartmentName FROM Employees LEFT JOIN Departments ON Employees.DepartmentID = Departments.DepartmentID;

Q37
Multiple Choice

What happens when there are no matching rows in the right table in a LEFT JOIN?

Q38
Multiple Choice

Which queries use LEFT JOIN to retrieve all customers and their orders?

SQL Code
SELECT Customers.CustomerName, Orders.OrderID
FROM Customers
LEFT JOIN Orders
ON Customers.CustomerID = Orders.CustomerID;
Q39
Multiple Choice

Select the queries that correctly retrieve all suppliers and their products using LEFT JOIN.

SQL Code
SELECT Suppliers.SupplierName, Products.ProductName
FROM Suppliers
LEFT JOIN Products
ON Suppliers.SupplierID = Products.SupplierID;
Q40
Multiple Choice

Which of the following queries retrieves all employees and their managers using LEFT JOIN?

SQL Code
SELECT Employees.EmployeeName, Managers.ManagerName
FROM Employees
LEFT JOIN Managers
ON Employees.ManagerID = Managers.ManagerID;
Q41
Multiple Choice

Identify the queries that use LEFT JOIN to retrieve all classes and their students.

SQL Code
SELECT Classes.ClassName, Students.StudentName
FROM Classes
LEFT JOIN Students
ON Classes.ClassID = Students.ClassID;
Q42
Multiple Choice

What does the following query retrieve? SELECT Customers.CustomerName, Orders.OrderDate FROM Customers LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID;

Q43
Multiple Choice

Which query correctly retrieves all customers and their addresses using LEFT JOIN?

SQL Code
SELECT Customers.CustomerName, Addresses.Address
FROM Customers
LEFT JOIN Addresses
ON Customers.AddressID = Addresses.AddressID;
Q44
Multiple Choice

What is the result of the following query? SELECT A.Col1, B.Col2 FROM TableA A LEFT JOIN TableB B ON A.ID = B.ID;

Q45
Multiple Choice

Which query retrieves all employees and their departments using LEFT JOIN?

SQL Code
SELECT Employees.EmployeeName, Departments.DepartmentName
FROM Employees
LEFT JOIN Departments
ON Employees.DepartmentID = Departments.DepartmentID;