Microsoft SQL Server Database Quiz Questions

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

The IS NOT NULL operator is used to test for non-empty values in a column.

Q2
True / False

The query 'SELECT * FROM Employees WHERE Department IS NOT NULL;' will return employees with a department assigned.

Q3
True / False

Using IS NOT NULL in a query will check for values explicitly set to zero.

Q4
True / False

The IS NOT NULL operator can be used in the SELECT clause to replace non-NULL values.

Q5
True / False

The query 'SELECT * FROM Orders WHERE OrderDate IS NOT NULL;' will return orders with a non-NULL order date.

Q6
True / False

The IS NOT NULL operator can be used to check for non-NULL values in any column of a table.

Q7
True / False

The IS NOT NULL operator is not supported in the WHERE clause of a SQL query.

Q8
True / False

Using IS NOT NULL in a query will always return the same result as using '= NOT NULL'.

Q9
True / False

The IS NOT NULL operator can be combined with the OR operator in a WHERE clause.

Q10
True / False

The IS NOT NULL operator can be used to check for non-NULL values in string columns only.

Q11
True / False

The query 'SELECT * FROM Employees WHERE ManagerID IS NOT NULL;' will retrieve employees who have a manager.

Q12
True / False

The IS NOT NULL operator can be used with aggregate functions like COUNT and SUM.

Q13
True / False

Using IS NOT NULL in a DELETE statement will delete all rows with non-NULL values in a specified column.

Q14
True / False

The IS NOT NULL operator is used to update non-NULL values in a table.

Q15
True / False

The query 'SELECT * FROM Invoices WHERE PaymentDate IS NOT NULL;' retrieves invoices with a payment date.

Q16
Single Choice

Which query retrieves employees with an email address?

SQL Code
SELECT EmployeeID, EmployeeName
FROM Employees
WHERE Email IS NOT NULL;
Q17
Single Choice

Which query lists products with non-NULL values in the Price column?

SQL Code
SELECT ProductID, ProductName
FROM Products
WHERE Price IS NOT NULL;
Q18
Single Choice

Which query retrieves orders that have been shipped?

SQL Code
SELECT OrderID, OrderDate
FROM Orders
WHERE ShipDate IS NOT NULL;
Q19
Single Choice

Which query lists suppliers with a non-NULL contact number?

SQL Code
SELECT SupplierID, SupplierName
FROM Suppliers
WHERE ContactNumber IS NOT NULL;
Q20
Single Choice

Which query retrieves customers with a non-NULL address?

SQL Code
SELECT CustomerID, CustomerName
FROM Customers
WHERE Address IS NOT NULL;
Q21
Single Choice

Which query retrieves employees who have a specified salary?

SQL Code
SELECT EmployeeID, EmployeeName
FROM Employees
WHERE Salary IS NOT NULL;
Q22
Single Choice

Which query lists orders that have a non-NULL discount?

SQL Code
SELECT OrderID, OrderDate
FROM Orders
WHERE Discount IS NOT NULL;
Q23
Single Choice

Which query retrieves customers with a non-NULL phone number?

SQL Code
SELECT CustomerID, CustomerName
FROM Customers
WHERE PhoneNumber IS NOT NULL;
Q24
Single Choice

Which query lists suppliers with a non-NULL email address?

SQL Code
SELECT SupplierID, SupplierName
FROM Suppliers
WHERE Email IS NOT NULL;
Q25
Single Choice

Which query retrieves products with a non-NULL category?

SQL Code
SELECT ProductID, ProductName
FROM Products
WHERE CategoryID IS NOT NULL;
Q26
Single Choice

Which query retrieves invoices with a non-NULL payment status?

SQL Code
SELECT InvoiceID, InvoiceDate
FROM Invoices
WHERE PaymentStatus IS NOT NULL;
Q27
Single Choice

Which query retrieves customers who have a specified credit limit?

SQL Code
SELECT CustomerID, CustomerName
FROM Customers
WHERE CreditLimit IS NOT NULL;
Q28
Single Choice

Which query retrieves orders with a non-NULL shipping address?

SQL Code
SELECT OrderID, OrderDate
FROM Orders
WHERE ShippingAddress IS NOT NULL;
Q29
Single Choice

Which query lists products with a non-NULL supplier?

SQL Code
SELECT ProductID, ProductName
FROM Products
WHERE SupplierID IS NOT NULL;
Q30
Single Choice

Which query retrieves employees with a non-NULL hire date?

SQL Code
SELECT EmployeeID, EmployeeName
FROM Employees
WHERE HireDate IS NOT NULL;
Q31
Multiple Choice

Which query retrieves customers with a non-NULL phone number and email address?

SQL Code
SELECT CustomerID, CustomerName
FROM Customers
WHERE PhoneNumber IS NOT NULL
AND Email IS NOT NULL;
Q32
Multiple Choice

Which query lists products with a non-NULL price and category?

SQL Code
SELECT ProductID, ProductName
FROM Products
WHERE Price IS NOT NULL
AND CategoryID IS NOT NULL;
Q33
Multiple Choice

Which query retrieves employees with a non-NULL hire date and salary?

SQL Code
SELECT EmployeeID, EmployeeName
FROM Employees
WHERE HireDate IS NOT NULL
AND Salary IS NOT NULL;
Q34
Multiple Choice

Which query lists orders with a non-NULL ship date and order status?

SQL Code
SELECT OrderID, OrderDate
FROM Orders
WHERE ShipDate IS NOT NULL
AND OrderStatus IS NOT NULL;
Q35
Multiple Choice

Which query retrieves suppliers with a non-NULL contact number and address?

SQL Code
SELECT SupplierID, SupplierName
FROM Suppliers
WHERE ContactNumber IS NOT NULL
AND Address IS NOT NULL;
Q36
Multiple Choice

Which query retrieves invoices with a non-NULL payment date and payment status?

SQL Code
SELECT InvoiceID, InvoiceDate
FROM Invoices
WHERE PaymentDate IS NOT NULL
AND PaymentStatus IS NOT NULL;
Q37
Multiple Choice

Which query retrieves products with a non-NULL description and price?

SQL Code
SELECT ProductID, ProductName
FROM Products
WHERE Description IS NOT NULL
AND Price IS NOT NULL;
Q38
Multiple Choice

Which query retrieves customers with a non-NULL email and credit limit?

SQL Code
SELECT CustomerID, CustomerName
FROM Customers
WHERE Email IS NOT NULL
AND CreditLimit IS NOT NULL;
Q39
Multiple Choice

Which query retrieves orders with a non-NULL discount and shipping date?

SQL Code
SELECT OrderID, OrderDate
FROM Orders
WHERE Discount IS NOT NULL
AND ShipDate IS NOT NULL;
Q40
Multiple Choice

Which query retrieves suppliers with a non-NULL contact number and email address?

SQL Code
SELECT SupplierID, SupplierName
FROM Suppliers
WHERE ContactNumber IS NOT NULL
AND Email IS NOT NULL;
Q41
Multiple Choice

Which query retrieves employees with a non-NULL department and salary?

SQL Code
SELECT EmployeeID, EmployeeName
FROM Employees
WHERE DepartmentID IS NOT NULL
AND Salary IS NOT NULL;
Q42
Multiple Choice

Which query retrieves customers with a non-NULL address and phone number?

SQL Code
SELECT CustomerID, CustomerName
FROM Customers
WHERE Address IS NOT NULL
AND PhoneNumber IS NOT NULL;
Q43
Multiple Choice

Which query lists products with a non-NULL supplier and category?

SQL Code
SELECT ProductID, ProductName
FROM Products
WHERE SupplierID IS NOT NULL
AND CategoryID IS NOT NULL;
Q44
Multiple Choice

Which query retrieves orders with a non-NULL order date and shipping address?

SQL Code
SELECT OrderID, OrderDate
FROM Orders
WHERE OrderDate IS NOT NULL
AND ShippingAddress IS NOT NULL;
Q45
Multiple Choice

Which query retrieves employees with a non-NULL phone number and address?

SQL Code
SELECT EmployeeID, EmployeeName
FROM Employees
WHERE PhoneNumber IS NOT NULL
AND Address IS NOT NULL;