Oracle Database Quiz Questions

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

The NOT LIKE operator in Oracle is used to exclude rows that match a specified pattern.

Q2
True / False

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

Q3
True / False

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

Q4
True / False

The NOT LIKE operator in Oracle is case-sensitive by default.

Q5
True / False

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

Q6
True / False

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

Q7
True / False

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

Q8
True / False

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

Q9
True / False

In Oracle, the NOT 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 NOT LIKE operator effectively, optimizing its performance, and understanding its impact on SQL queries.

Q11
Single Choice

What will the following Oracle SQL query return?

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

Which of the following Oracle SQL queries retrieves products whose names do not contain the word 'Phone'?

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

What does the following Oracle SQL query do?

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

Which of the following Oracle SQL queries selects employees whose names do not end with 'son'?

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

What will the following Oracle SQL query return?

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

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

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

What will the following Oracle SQL query return?

SQL Code
SELECT city
FROM locations
WHERE city NOT 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 NOT LIKE '%Table%Chair%';
Q19
Single Choice

What will the following Oracle SQL query return?

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

Which of the following Oracle SQL statements will return records where the order_description does not contain 'urgent' and does not end with 'today'?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Which SQL code snippet uses the NOT LIKE operator to filter inventory items where the SKU does not contain 'ABC' in Oracle?

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

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

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

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

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

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

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

Which SQL code snippet uses the NOT LIKE operator to filter orders where the customer name does not include 'John' in Oracle?

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

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

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

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

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

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

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

Which SQL code snippet uses the NOT LIKE operator to filter customers whose address does not contain 'Street' in Oracle?

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

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

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

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

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

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

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