Oracle Database Quiz Questions

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

In Oracle, the <> operator is used to compare two values to determine if they are not equal.

Q2
True / False

The != operator can also be used in Oracle to compare two values for inequality.

Q3
True / False

In Oracle, both <> and != operators can be used with numeric, character, and date data types.

Q4
True / False

In Oracle, the <> and != operators can be used in the WHERE clause to filter rows based on inequality.

Q5
True / False

The <> and != operators in Oracle are case-sensitive when comparing character data.

Q6
True / False

In Oracle, using <> or != operators with NULL values will always return true.

Q7
True / False

In Oracle, the <> and != operators can be used in subqueries to filter rows based on values not equal to those in the subquery result.

Q8
True / False

The <> and != operators in Oracle can be combined with logical operators like AND and OR to create complex conditions.

Q9
True / False

In Oracle, using the <> or != operators on indexed columns always results in a full table scan.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on using the <> and != operators efficiently and understanding their impact on query performance and logical outcomes.

Q11
Single Choice

What does the following Oracle SQL query return?

SQL Code
SELECT COUNT(*)
FROM employees
WHERE department_id <> 10;
Q12
Single Choice

Which of the following Oracle SQL queries correctly identifies employees who do not work in department 20?

Q13
Single Choice

In Oracle, which of the following conditions correctly identifies records where the salary is not equal to 5000?

Q14
Single Choice

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

SQL Code
SELECT first_name, last_name
FROM employees
WHERE job_id <> 'SA_REP';
Q15
Single Choice

Which of the following Oracle SQL statements will return employees whose salary is neither 4000 nor 5000?

Q16
Single Choice

In Oracle, how would you write a query to select rows where the hire_date is not equal to '01-JAN-2020'?

Q17
Single Choice

Which of the following Oracle SQL queries will correctly exclude employees whose commission_pct is not 0.2?

Q18
Single Choice

Which Oracle SQL query returns all products that are not discontinued? How should the query be modified to return products that are discontinued?

SQL Code
SELECT product_name
FROM products
WHERE discontinued = 0;
Q19
Single Choice

Which of the following Oracle SQL queries correctly retrieves employees whose manager_id is not equal to their employee_id?

Q20
Single Choice

Given the following Oracle SQL statement:What does this query do?

SQL Code
SELECT department_name
FROM departments
WHERE department_id <> (SELECT department_id FROM employees WHERE last_name = 'Smith');
Q21
Multiple Choice

Which SQL code snippet correctly uses the '<>' and '!=' operators to filter employees where the department is not equal to 'HR' in Oracle?

SQL Code
SELECT *
FROM employees
WHERE department <> 'HR';

SELECT *
FROM employees
WHERE department != 'HR';

SELECT employee_id, department
FROM employees
WHERE department <> 'HR';
Q22
Multiple Choice

Which SQL code snippet demonstrates how to use the '<>' and '!=' operators to filter orders where the status is not equal to 'Shipped' in Oracle?

SQL Code
SELECT *
FROM orders
WHERE status <> 'Shipped';

SELECT *
FROM orders
WHERE status != 'Shipped';

SELECT order_id, status
FROM orders
WHERE status <> 'Shipped';
Q23
Multiple Choice

Which SQL code snippet uses the '<>' and '!=' operators to filter products where the category is not equal to 'Electronics' in Oracle?

SQL Code
SELECT *
FROM products
WHERE category <> 'Electronics';

SELECT *
FROM products
WHERE category != 'Electronics';

SELECT product_id, category
FROM products
WHERE category <> 'Electronics';
Q24
Multiple Choice

Which SQL code snippet demonstrates how to use the '<>' and '!=' operators to filter customers where the city is not equal to 'New York' in Oracle?

SQL Code
SELECT *
FROM customers
WHERE city <> 'New York';

SELECT *
FROM customers
WHERE city != 'New York';

SELECT customer_id, city
FROM customers
WHERE city <> 'New York';
Q25
Multiple Choice

Which SQL code snippet uses the '<>' and '!=' operators to filter inventory where the stock status is not equal to 'In Stock' in Oracle?

SQL Code
SELECT *
FROM inventory
WHERE stock_status <> 'In Stock';

SELECT *
FROM inventory
WHERE stock_status != 'In Stock';

SELECT item_id, stock_status
FROM inventory
WHERE stock_status <> 'In Stock';
Q26
Multiple Choice

Which SQL code snippet demonstrates advanced use of the '<>' and '!=' operators to filter sales records where the region is not equal to 'North' in Oracle?

SQL Code
SELECT *
FROM sales
WHERE region <> 'North';

SELECT *
FROM sales
WHERE region != 'North';

SELECT sale_id, region
FROM sales
WHERE region <> 'North';
Q27
Multiple Choice

Which SQL code snippet uses the '<>' and '!=' operators to filter employees where the job title is not equal to 'Analyst' in Oracle?

SQL Code
SELECT *
FROM employees
WHERE job_title <> 'Analyst';

SELECT *
FROM employees
WHERE job_title != 'Analyst';

SELECT employee_id, job_title
FROM employees
WHERE job_title <> 'Analyst';
Q28
Multiple Choice

Which SQL code snippet demonstrates advanced use of the '<>' and '!=' operators to filter orders where the payment method is not equal to 'Credit Card' in Oracle?

SQL Code
SELECT *
FROM orders
WHERE payment_method <> 'Credit Card';

SELECT *
FROM orders
WHERE payment_method != 'Credit Card';

SELECT order_id, payment_method
FROM orders
WHERE payment_method <> 'Credit Card';
Q29
Multiple Choice

Which SQL code snippet uses the '<>' and '!=' operators to filter products where the brand is not equal to 'Apple' in Oracle?

SQL Code
SELECT *
FROM products
WHERE brand <> 'Apple';

SELECT *
FROM products
WHERE brand != 'Apple';

SELECT product_id, brand
FROM products
WHERE brand <> 'Apple';
Q30
Multiple Choice

Which SQL code snippet demonstrates the certification-level use of the '<>' and '!=' operators to filter transactions where the status is not equal to 'Completed' in Oracle?

SQL Code
SELECT *
FROM transactions
WHERE status <> 'Completed';

SELECT *
FROM transactions
WHERE status != 'Completed';

SELECT transaction_id, status
FROM transactions
WHERE status <> 'Completed';