Oracle Database Quiz Questions

Course Name:Oracle
Chapter Name:Chapter 5 - DDL (Data Definition Language)
Lesson Content Link:NUll vs NOT NULL
Current Quiz Count:30
Progress
0%
Q1
True / False

In Oracle, a NULL value represents the absence of a value.

Q2
True / False

In Oracle, a column defined with the NOT NULL constraint can contain NULL values.

Q3
True / False

The NULL keyword in Oracle can be used in SQL statements to insert a NULL value into a column.

Q4
True / False

In Oracle, the expression NULL = NULL returns TRUE.

Q5
True / False

In Oracle, the NVL function can be used to replace NULL values with a specified value.

Q6
True / False

The IS NOT NULL condition in Oracle is used to filter out rows that contain NULL values in a specified column.

Q7
True / False

In Oracle, a unique constraint on a column allows multiple NULL values.

Q8
True / False

In Oracle, the COALESCE function returns the first non-NULL value from a list of expressions.

Q9
True / False

Oracle treats empty strings ('') and NULL as the same in VARCHAR2 columns.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes topics on handling NULL values and using functions like NVL and COALESCE to manage NULLs in SQL statements.

Q11
Single Choice

In Oracle, what does the NOT NULL constraint do when applied to a column?

Q12
Single Choice

What is the default behavior of a column in Oracle if no NOT NULL constraint is specified?

Q13
Single Choice

Which Oracle SQL command is used to add a NOT NULL constraint to an existing column?

Q14
Single Choice

ALTER TABLE table_name SET column_name NOT NULL;

SQL Code
SELECT * FROM employees WHERE department_id IS NULL;
Q15
Single Choice

Consider the following SQL command:What happens if you try to insert a row without specifying a value for order_date?

SQL Code
CREATE TABLE orders (
 order_id NUMBER PRIMARY KEY,
 order_date DATE NOT NULL,
 customer_id NUMBER
);
Q16
Single Choice

Which of the following Oracle SQL commands will remove a NOT NULL constraint from a column?

SQL Code
ALTER TABLE customers MODIFY customer_name NULL;
Q17
Single Choice

What is the outcome of the following Oracle SQL statement?

SQL Code
ALTER TABLE products ADD (price NUMBER DEFAULT 0 NOT NULL);
Q18
Single Choice

How does Oracle handle NULL values in aggregate functions like SUM() or AVG()?

Q19
Single Choice

What is the result of the following Oracle SQL query if discount is NULL?

SQL Code
SELECT NVL(discount, 0) FROM promotions WHERE promotion_id = 1;
Q20
Single Choice

Which of the following is true about the use of NOT NULL constraints in Oracle?

Q21
Multiple Choice

Identify the SQL scripts that correctly define a column with the NOT NULL constraint in Oracle.

Q22
Multiple Choice

Select the SQL scripts that correctly modify a column to allow NULL values in Oracle.

Q23
Multiple Choice

Determine the SQL scripts that correctly query rows where a specific column is NULL in Oracle.

Q24
Multiple Choice

Identify the SQL scripts that correctly insert NULL values into a table in Oracle.

Q25
Multiple Choice

Select the SQL scripts that correctly enforce a NOT NULL constraint on an existing column in Oracle.

Q26
Multiple Choice

Identify the SQL scripts that correctly drop the NOT NULL constraint from an existing column in Oracle.

Q27
Multiple Choice

Determine the SQL scripts that correctly define a table with multiple NOT NULL columns in Oracle.

Q28
Multiple Choice

Identify the SQL scripts that correctly handle checking for NULL values in Oracle.

Q29
Multiple Choice

Select the SQL scripts that correctly enforce the NOT NULL constraint during table creation in Oracle.

Q30
Multiple Choice

Determine the SQL scripts that correctly alter a table to add a NOT NULL column in Oracle.