Oracle Database Quiz Questions

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

In Oracle, the BETWEEN operator is used to filter the result set within a specified range.

Q2
True / False

The BETWEEN operator in Oracle includes the boundary values in its range.

Q3
True / False

In Oracle, you can use the BETWEEN operator with numeric, date, and character data types.

Q4
True / False

The BETWEEN operator in Oracle can be used in the WHERE clause to filter rows based on a date range.

Q5
True / False

In Oracle, the BETWEEN operator is case-sensitive when used with character data.

Q6
True / False

In Oracle, you can use the BETWEEN operator with multiple columns in a single WHERE clause.

Q7
True / False

In Oracle, the BETWEEN operator can be combined with the AND operator to create complex range conditions.

Q8
True / False

In Oracle, using the BETWEEN operator on indexed columns can optimize query performance.

Q9
True / False

The BETWEEN operator can be used in Oracle subqueries to filter rows in nested queries.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on using the BETWEEN operator effectively and understanding its performance implications.

Q11
Single Choice

What is the purpose of the BETWEEN operator in Oracle SQL?

Q12
Single Choice

Consider the following Oracle SQL query:What will this query return?

SQL Code
SELECT * FROM employees WHERE salary BETWEEN 5000 AND 10000;
Q13
Single Choice

Which of the following data types can be used with the BETWEEN operator in Oracle?

Q14
Single Choice

Consider the following Oracle SQL query:What does this query return?

SQL Code
SELECT * FROM orders WHERE order_date BETWEEN '01-JAN-2023' AND '31-DEC-2023';
Q15
Single Choice

What will be the result of executing the following Oracle SQL query?

SQL Code
SELECT * FROM products WHERE price BETWEEN 100 AND 200 ORDER BY price DESC;
Q16
Single Choice

Consider the following Oracle SQL query:What does this query return?

SQL Code
SELECT * FROM employees WHERE hire_date BETWEEN '01-JAN-2020' AND '31-DEC-2020';
Q17
Single Choice

What is the effect of using the NOT BETWEEN operator in an Oracle SQL query?

Q18
Single Choice

Consider the following Oracle SQL query:What does this query return?

SQL Code
SELECT * FROM sales WHERE amount NOT BETWEEN 1000 AND 5000;
Q19
Single Choice

How does Oracle handle NULL values when using the BETWEEN operator in a query?

Q20
Single Choice

In an Oracle certification exam, you encounter the following SQL statement:What does this query return?

SQL Code
SELECT product_id, product_name FROM products WHERE quantity_in_stock BETWEEN 10 AND 50 AND price NOT BETWEEN 100 AND 200;
Q21
Multiple Choice

Which SQL code snippet correctly uses the BETWEEN operator to filter employees with salaries between 50000 and 100000 in Oracle?

SQL Code
SELECT *
FROM employees
WHERE salary BETWEEN 50000 AND 100000;

SELECT *
FROM employees
WHERE salary > 50000 AND salary < 100000;

SELECT employee_id, salary
FROM employees
WHERE salary BETWEEN 50000 AND 100000;
Q22
Multiple Choice

Which SQL code snippet demonstrates how to use the BETWEEN operator to filter orders placed between two specific dates in Oracle?

SQL Code
SELECT *
FROM orders
WHERE order_date BETWEEN TO_DATE('2023-01-01', 'YYYY-MM-DD') AND TO_DATE('2023-06-30', 'YYYY-MM-DD');

SELECT *
FROM orders
WHERE order_date >= TO_DATE('2023-01-01', 'YYYY-MM-DD') AND order_date <= TO_DATE('2023-06-30', 'YYYY-MM-DD');

SELECT order_id, order_date
FROM orders
WHERE order_date BETWEEN TO_DATE('2023-01-01', 'YYYY-MM-DD') AND TO_DATE('2023-06-30', 'YYYY-MM-DD');
Q23
Multiple Choice

Which SQL code snippet uses the BETWEEN operator to filter products with prices between 20 and 50 in Oracle?

SQL Code
SELECT *
FROM products
WHERE price BETWEEN 20 AND 50;

SELECT *
FROM products
WHERE price >= 20 AND price <= 50;

SELECT product_id, price
FROM products
WHERE price BETWEEN 20 AND 50;
Q24
Multiple Choice

Which SQL code snippet demonstrates how to use the BETWEEN operator to filter employees with hire dates between two specific years in Oracle?

SQL Code
SELECT *
FROM employees
WHERE hire_date BETWEEN TO_DATE('2010-01-01', 'YYYY-MM-DD') AND TO_DATE('2020-12-31', 'YYYY-MM-DD');

SELECT *
FROM employees
WHERE hire_date >= TO_DATE('2010-01-01', 'YYYY-MM-DD') AND hire_date <= TO_DATE('2020-12-31', 'YYYY-MM-DD');

SELECT employee_id, hire_date
FROM employees
WHERE hire_date BETWEEN TO_DATE('2010-01-01', 'YYYY-MM-DD') AND TO_DATE('2020-12-31', 'YYYY-MM-DD');
Q25
Multiple Choice

Which SQL code snippet uses the BETWEEN operator to filter inventory items with quantities between 100 and 500 in Oracle?

SQL Code
SELECT *
FROM inventory
WHERE quantity BETWEEN 100 AND 500;

SELECT *
FROM inventory
WHERE quantity >= 100 AND quantity <= 500;

SELECT item_id, quantity
FROM inventory
WHERE quantity BETWEEN 100 AND 500;
Q26
Multiple Choice

Which SQL code snippet demonstrates advanced use of the BETWEEN operator to filter sales records where the sales amount is between 1000 and 5000 in Oracle?

SQL Code
SELECT *
FROM sales
WHERE sales_amount BETWEEN 1000 AND 5000;

SELECT *
FROM sales
WHERE sales_amount >= 1000 AND sales_amount <= 5000;

SELECT sale_id, sales_amount
FROM sales
WHERE sales_amount BETWEEN 1000 AND 5000;
Q27
Multiple Choice

Which SQL code snippet uses the BETWEEN operator to filter customer records where the customer age is between 18 and 35 in Oracle?

SQL Code
SELECT *
FROM customers
WHERE age BETWEEN 18 AND 35;

SELECT *
FROM customers
WHERE age >= 18 AND age <= 35;

SELECT customer_id, age
FROM customers
WHERE age BETWEEN 18 AND 35;
Q28
Multiple Choice

Which SQL code snippet demonstrates advanced use of the BETWEEN operator to filter order items with quantities between 10 and 50 and prices between 100 and 500 in Oracle?

SQL Code
SELECT *
FROM order_items
WHERE quantity BETWEEN 10 AND 50
AND price BETWEEN 100 AND 500;

SELECT *
FROM order_items
WHERE quantity >= 10 AND quantity <= 50
AND price >= 100 AND price <= 500;

SELECT item_id, quantity, price
FROM order_items
WHERE quantity BETWEEN 10 AND 50
AND price BETWEEN 100 AND 500;
Q29
Multiple Choice

Which SQL code snippet uses the BETWEEN operator to filter employees with performance ratings between 3 and 5 in Oracle?

SQL Code
SELECT *
FROM employees
WHERE performance_rating BETWEEN 3 AND 5;

SELECT *
FROM employees
WHERE performance_rating >= 3 AND performance_rating <= 5;

SELECT employee_id, performance_rating
FROM employees
WHERE performance_rating BETWEEN 3 AND 5;
Q30
Multiple Choice

Which SQL code snippet demonstrates the certification-level use of the BETWEEN operator to filter orders where the total amount is between 1000 and 5000 and the order date is within the last year in Oracle?

SQL Code
SELECT *
FROM orders
WHERE total_amount BETWEEN 1000 AND 5000
AND order_date BETWEEN SYSDATE - 365 AND SYSDATE;

SELECT *
FROM orders
WHERE total_amount >= 1000 AND total_amount <= 5000
AND order_date >= SYSDATE - 365 AND order_date <= SYSDATE;

SELECT order_id, total_amount, order_date
FROM orders
WHERE total_amount BETWEEN 1000 AND 5000
AND order_date BETWEEN SYSDATE - 365 AND SYSDATE;