PostgreSQL Database Quiz Questions

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

In PostgreSQL, the IS NULL operator is used to check if a value is NULL.

Q2
True / False

The expression NULL = NULL in PostgreSQL evaluates to TRUE.

Q3
True / False

In PostgreSQL, the IS NOT NULL operator is used to check if a value is not NULL.

Q4
True / False

In PostgreSQL, the IS NULL condition can be used in WHERE clauses to filter rows with NULL values.

Q5
True / False

PostgreSQL treats empty strings and NULL as equivalent in IS NULL checks.

Q6
True / False

In PostgreSQL, using COALESCE(column_name, 'default_value') IS NULL will never evaluate to TRUE.

Q7
True / False

In PostgreSQL, using the IS DISTINCT FROM clause can be an alternative to IS NULL checks for handling NULL values.

Q8
True / False

In PostgreSQL, you can create a partial index that only includes rows where a column is NULL using WHERE column IS NULL.

Q9
True / False

PostgreSQL allows using IS NULL in JOIN conditions to filter out rows with NULL values in the joined columns.

Q10
True / False

In PostgreSQL, the expression CASE WHEN column IS NULL THEN 'Yes' ELSE 'No' END can be used to replace NULL values with a specified string.

Q11
Single Choice

What does the IS NULL operator check in PostgreSQL?

Q12
Single Choice

Given the SQL query:

SQL Code
SELECT * FROM employees WHERE salary IS NULL;
What does this query return?
Q13
Single Choice

Which of the following statements will return rows where the column age is NULL in PostgreSQL?

Q14
Single Choice

Consider the table orders with a column delivery_date. Which query will return orders with no scheduled delivery date in PostgreSQL?

Q15
Single Choice

Given the following SQL:

SQL Code
SELECT COUNT(*) FROM products WHERE discontinued IS NULL;
What does this query count?
Q16
Single Choice

How can you select all rows from a table users where the last_login column has never been set (is NULL) in PostgreSQL?

Q17
Single Choice

In PostgreSQL, which of the following queries will correctly identify rows where the expiration_date column is NULL and the status is 'active'?

Q18
Single Choice

Which SQL statement will return all employees from the employee table where both termination_date and resignation_date are NULL in PostgreSQL?

Q19
Single Choice

How would you select records from a PostgreSQL database where a JSON field data->>'status' is not set (NULL)?

Q20
Single Choice

Given a table contracts with columns contract_id, start_date, and end_date, write a query to find all contracts where the end_date is NULL but the start_date is set in PostgreSQL.

Q21
Multiple Choice

Identify the SQL scripts that correctly use the IS NULL operator to filter rows with null values in PostgreSQL.

Q22
Multiple Choice

Select the SQL scripts that correctly use the IS NULL operator with string values in PostgreSQL.

Q23
Multiple Choice

Determine the SQL scripts that correctly use the IS NULL operator with subqueries in PostgreSQL.

Q24
Multiple Choice

Identify the SQL scripts that correctly use the IS NULL operator with JOINs in PostgreSQL.

Q25
Multiple Choice

Select the SQL scripts that correctly use the IS NULL operator with multiple columns in PostgreSQL.

Q26
Multiple Choice

Determine the SQL scripts that correctly use the IS NULL operator with window functions in PostgreSQL.

Q27
Multiple Choice

Identify the SQL scripts that correctly use the IS NULL operator with EXISTS in PostgreSQL.

Q28
Multiple Choice

Determine the SQL scripts that correctly use the IS NULL operator with UNION in PostgreSQL.

Q29
Multiple Choice

Identify the SQL scripts that correctly use the IS NULL operator with DISTINCT in PostgreSQL.

Q30
Multiple Choice

Determine the SQL scripts that correctly use the IS NULL operator with LIMIT OFFSET in PostgreSQL.