Oracle Database Quiz Questions

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

The LIKE operator in Oracle is used to search for a specified pattern in a column.

Q2
True / False

In Oracle, the percent sign (%) is used as a wildcard character in the LIKE operator to match zero or more characters.

Q3
True / False

The underscore (_) is used as a wildcard character in the LIKE operator to match exactly one character in Oracle.

Q4
True / False

The LIKE operator in Oracle is case-insensitive by default.

Q5
True / False

In Oracle, you can use the ESCAPE keyword with the LIKE operator to search for wildcard characters as literals.

Q6
True / False

The LIKE operator can be used with numeric data types in Oracle.

Q7
True / False

In Oracle, the LIKE operator can be used in combination with the AND and OR operators to create complex search conditions.

Q8
True / False

Using the LIKE operator with leading wildcards (e.g., %pattern) can impact query performance in Oracle.

Q9
True / False

In Oracle, the LIKE operator can be used in subqueries to filter rows based on pattern matching in the subquery results.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on using the LIKE operator effectively, optimizing its performance, and understanding its impact on SQL queries.

Q11
Single Choice

What does the following Oracle SQL query do?

SQL Code
SELECT employee_name
FROM employees
WHERE employee_name LIKE 'A%';
Q12
Single Choice

In Oracle SQL, which query retrieves all product names that contain the word 'Phone'?

SQL Code
SELECT product_name
FROM products
WHERE product_name LIKE '%Phone%';
Q13
Single Choice

What will the following Oracle SQL query return?

SQL Code
SELECT department_name
FROM departments
WHERE department_name LIKE '_R%';
Q14
Single Choice

Which of the following Oracle SQL queries will select employees whose names end with 'son'?

SQL Code
SELECT employee_name
FROM employees
WHERE employee_name LIKE '%son';
Q15
Single Choice

What will the following Oracle SQL query return?

SQL Code
SELECT customer_name
FROM customers
WHERE customer_name LIKE 'M_%';
Q16
Single Choice

In Oracle SQL, how would you find all employees whose names have exactly 5 characters?

SQL Code
SELECT employee_name
FROM employees
WHERE employee_name LIKE '_____';
Q17
Single Choice

What will the following Oracle SQL query return?

SQL Code
SELECT city
FROM locations
WHERE city LIKE '%ville';
Q18
Single Choice

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

SQL Code
SELECT product_name
FROM products
WHERE product_name LIKE '%Table%Chair%';
Q19
Single Choice

What will the following Oracle SQL query return?

SQL Code
SELECT employee_name
FROM employees
WHERE employee_name LIKE 'Jo%n';
Q20
Single Choice

Which of the following Oracle SQL statements will return records where the order_description contains 'urgent' and ends with 'today'?

SQL Code
SELECT order_id, order_description
FROM orders
WHERE order_description LIKE '%urgent%today';
Q21
Multiple Choice

Which SQL code snippet correctly uses the LIKE operator to filter employees whose name starts with 'A' in Oracle?

SQL Code
SELECT *
FROM employees
WHERE name LIKE 'A%';

SELECT *
FROM employees
WHERE name LIKE '%A';

SELECT employee_id, name
FROM employees
WHERE name LIKE 'A%';
Q22
Multiple Choice

Which SQL code snippet demonstrates how to use the LIKE operator to filter orders where the order ID contains '123' in Oracle?

SQL Code
SELECT *
FROM orders
WHERE order_id LIKE '%123%';

SELECT *
FROM orders
WHERE order_id LIKE '123%';

SELECT order_id, status
FROM orders
WHERE order_id LIKE '%123%';
Q23
Multiple Choice

Which SQL code snippet uses the LIKE operator to filter products where the product name ends with 'Pro' in Oracle?

SQL Code
SELECT *
FROM products
WHERE product_name LIKE '%Pro';

SELECT *
FROM products
WHERE product_name LIKE 'Pro%';

SELECT product_id, product_name
FROM products
WHERE product_name LIKE '%Pro';
Q24
Multiple Choice

Which SQL code snippet demonstrates how to use the LIKE operator to filter customers whose phone number starts with '555' in Oracle?

SQL Code
SELECT *
FROM customers
WHERE phone_number LIKE '555%';

SELECT *
FROM customers
WHERE phone_number LIKE '%555';

SELECT customer_id, phone_number
FROM customers
WHERE phone_number LIKE '555%';
Q25
Multiple Choice

Which SQL code snippet uses the LIKE operator to filter inventory items where the SKU contains 'ABC' in Oracle?

SQL Code
SELECT *
FROM inventory
WHERE sku LIKE '%ABC%';

SELECT *
FROM inventory
WHERE sku LIKE 'ABC%';

SELECT item_id, sku
FROM inventory
WHERE sku LIKE '%ABC%';
Q26
Multiple Choice

Which SQL code snippet demonstrates advanced use of the LIKE operator to filter employees whose email domain is '@example.com' in Oracle?

SQL Code
SELECT *
FROM employees
WHERE email LIKE '%@example.com';

SELECT *
FROM employees
WHERE email LIKE '@example.com%';

SELECT employee_id, email
FROM employees
WHERE email LIKE '%@example.com';
Q27
Multiple Choice

Which SQL code snippet uses the LIKE operator to filter orders where the customer name includes 'John' in Oracle?

SQL Code
SELECT *
FROM orders
WHERE customer_name LIKE '%John%';

SELECT *
FROM orders
WHERE customer_name LIKE 'John%';

SELECT order_id, customer_name
FROM orders
WHERE customer_name LIKE '%John%';
Q28
Multiple Choice

Which SQL code snippet demonstrates advanced use of the LIKE operator to filter products whose description starts with 'New' in Oracle?

SQL Code
SELECT *
FROM products
WHERE description LIKE 'New%';

SELECT *
FROM products
WHERE description LIKE '%New';

SELECT product_id, description
FROM products
WHERE description LIKE 'New%';
Q29
Multiple Choice

Which SQL code snippet uses the LIKE operator to filter customers whose address contains 'Street' in Oracle?

SQL Code
SELECT *
FROM customers
WHERE address LIKE '%Street%';

SELECT *
FROM customers
WHERE address LIKE 'Street%';

SELECT customer_id, address
FROM customers
WHERE address LIKE '%Street%';
Q30
Multiple Choice

Which SQL code snippet demonstrates the certification-level use of the LIKE operator to filter transactions where the transaction code starts with 'TXN' in Oracle?

SQL Code
SELECT *
FROM transactions
WHERE transaction_code LIKE 'TXN%';

SELECT *
FROM transactions
WHERE transaction_code LIKE '%TXN';

SELECT transaction_id, transaction_code
FROM transactions
WHERE transaction_code LIKE 'TXN%';