Q1
True / FalseIn PostgreSQL, the IS NULL operator is used to check if a value is NULL.
The IS NULL operator in PostgreSQL checks if a column's value is NULL.
Q2
True / FalseThe expression NULL = NULL in PostgreSQL evaluates to TRUE.
In PostgreSQL, NULL represents an unknown value, so NULL = NULL evaluates to FALSE. Instead, use IS NULL to check for NULL values.
Q3
True / FalseIn PostgreSQL, the IS NOT NULL operator is used to check if a value is not NULL.
The IS NOT NULL operator checks if a column's value is not NULL.
Q4
True / FalseIn PostgreSQL, the IS NULL condition can be used in WHERE clauses to filter rows with NULL values.
The IS NULL condition is commonly used in WHERE clauses to filter out rows that have NULL values in a specific column.
Q5
True / FalsePostgreSQL treats empty strings and NULL as equivalent in IS NULL checks.
PostgreSQL treats empty strings ('') and NULL as different. An empty string is a valid value, whereas NULL represents the absence of a value.
Q6
True / FalseIn PostgreSQL, using COALESCE(column_name, 'default_value') IS NULL will never evaluate to TRUE.
COALESCE returns the first non-NULL value. If 'default_value' is provided, the result will never be NULL.
Q7
True / FalseIn PostgreSQL, using the IS DISTINCT FROM clause can be an alternative to IS NULL checks for handling NULL values.
IS DISTINCT FROM treats NULL values as distinct from non-NULL values, providing a reliable way to compare NULLs and non-NULLs.
Q8
True / FalseIn PostgreSQL, you can create a partial index that only includes rows where a column is NULL using WHERE column IS NULL.
Partial indexes can be created in PostgreSQL to include only rows that satisfy a specific condition, such as column IS NULL.
Q9
True / FalsePostgreSQL allows using IS NULL in JOIN conditions to filter out rows with NULL values in the joined columns.
IS NULL can be used in JOIN conditions to exclude rows with NULL values in the joined columns.
Q10
True / FalseIn PostgreSQL, the expression CASE WHEN column IS NULL THEN 'Yes' ELSE 'No' END can be used to replace NULL values with a specified string.
The CASE expression in PostgreSQL can be used to check if a column is NULL and return a specified string, effectively replacing NULL values in the result set.