Oracle Database Quiz Questions

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

In Oracle, the ROUND function is used to round a numeric value to a specified number of decimal places.

Q2
True / False

The CEIL function in Oracle returns the smallest integer that is greater than or equal to a given numeric value.

Q3
True / False

In Oracle, the FLOOR function returns the largest integer that is less than or equal to a given numeric value.

Q4
True / False

In Oracle, the MOD function returns the remainder of a division operation.

Q5
True / False

The TRUNC function in Oracle can be used to truncate a numeric value to a specified number of decimal places.

Q6
True / False

In Oracle, the POWER function returns the result of raising one numeric value to the power of another.

Q7
True / False

The SIGN function in Oracle returns the sign of a numeric value, indicating whether the value is positive, negative, or zero.

Q8
True / False

In Oracle, the ABS function returns the absolute value of a numeric expression.

Q9
True / False

The LN function in Oracle calculates the natural logarithm of a given numeric value.

Q10
True / False

The Oracle Certified Professional (OCP) exam includes knowledge on using numeric functions effectively, understanding their syntax, and optimizing their performance in SQL queries.

Q11
Single Choice

Which Oracle SQL function is used to round a number to the nearest integer?

Q12
Single Choice

What will be the result of the following Oracle SQL expression?

SQL Code
SELECT ABS(-15) FROM dual;
Q13
Single Choice

Which Oracle SQL function can you use to find the remainder of a division operation?

Q14
Single Choice

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

SQL Code
SELECT ROUND(45.678, 1) FROM dual;
Q15
Single Choice

Which Oracle SQL function would you use to always round a number up to the nearest integer?

Q16
Single Choice

Given the Oracle SQL query:What will be the result?

SQL Code
SELECT TRUNC(15.789, 2) FROM dual;
Q17
Single Choice

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

SQL Code
SELECT POWER(2, 3) FROM dual;
Q18
Single Choice

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

SQL Code
SELECT SIGN(-25) FROM dual;
Q19
Single Choice

Which Oracle SQL function can be used to return the smallest integer greater than or equal to a given number?

Q20
Single Choice

What is the result of the following Oracle SQL query?

SQL Code
SELECT TRUNC(MOD(ABS(-17.8), 7)) FROM dual;
Q21
Multiple Choice

Which SQL code snippet uses the `ROUND` function to round the salary to 2 decimal places in Oracle?

SQL Code
SELECT employee_id, salary, ROUND(salary, 2) AS rounded_salary
FROM employees;

SELECT employee_id, salary, ROUND(salary, 2) AS rounded_salary
FROM employees;

SELECT employee_id, salary, ROUND(salary, 2) AS rounded_salary
FROM employees;
Q22
Multiple Choice

Which SQL code snippet uses the `TRUNC` function to truncate the salary to the nearest thousand in Oracle?

SQL Code
SELECT employee_id, salary, TRUNC(salary, -3) AS truncated_salary
FROM employees;

SELECT employee_id, salary, TRUNC(salary, -3) AS truncated_salary
FROM employees;

SELECT employee_id, salary, TRUNC(salary, -3) AS truncated_salary
FROM employees;
Q23
Multiple Choice

Which SQL code snippet uses the `MOD` function to find the remainder when the salary is divided by 1000 in Oracle?

SQL Code
SELECT employee_id, salary, MOD(salary, 1000) AS remainder
FROM employees;

SELECT employee_id, salary, MOD(salary, 1000) AS remainder
FROM employees;

SELECT employee_id, salary, MOD(salary, 1000) AS remainder
FROM employees;
Q24
Multiple Choice

Which SQL code snippet uses the `FLOOR` function to find the largest integer less than or equal to the salary in Oracle?

SQL Code
SELECT employee_id, salary, FLOOR(salary) AS floor_salary
FROM employees;

SELECT employee_id, salary, FLOOR(salary) AS floor_salary
FROM employees;

SELECT employee_id, salary, FLOOR(salary) AS floor_salary
FROM employees;
Q25
Multiple Choice

Which SQL code snippet uses the `CEIL` function to find the smallest integer greater than or equal to the salary in Oracle?

SQL Code
SELECT employee_id, salary, CEIL(salary) AS ceil_salary
FROM employees;

SELECT employee_id, salary, CEIL(salary) AS ceil_salary
FROM employees;

SELECT employee_id, salary, CEIL(salary) AS ceil_salary
FROM employees;
Q26
Multiple Choice

Which SQL code snippet demonstrates advanced use of the `POWER` function to calculate the square of the employee's salary in Oracle?

SQL Code
SELECT employee_id, salary, POWER(salary, 2) AS squared_salary
FROM employees;

SELECT employee_id, salary, POWER(salary, 2) AS squared_salary
FROM employees;

SELECT employee_id, salary, POWER(salary, 2) AS squared_salary
FROM employees;
Q27
Multiple Choice

Which SQL code snippet demonstrates advanced use of the `SQRT` function to calculate the square root of the employee's salary in Oracle?

SQL Code
SELECT employee_id, salary, SQRT(salary) AS sqrt_salary
FROM employees;

SELECT employee_id, salary, SQRT(salary) AS sqrt_salary
FROM employees;

SELECT employee_id, salary, SQRT(salary) AS sqrt_salary
FROM employees;
Q28
Multiple Choice

Which SQL code snippet demonstrates certification-level use of the `SIGN` function to determine the sign of the employee's bonus in Oracle?

SQL Code
SELECT employee_id, bonus, SIGN(bonus) AS bonus_sign
FROM employees;

SELECT employee_id, bonus, SIGN(bonus) AS bonus_sign
FROM employees;

SELECT employee_id, bonus, SIGN(bonus) AS bonus_sign
FROM employees;
Q29
Multiple Choice

Which SQL code snippet demonstrates certification-level use of the `ABS` function to find the absolute value of the employee's bonus in Oracle?

SQL Code
SELECT employee_id, bonus, ABS(bonus) AS abs_bonus
FROM employees;

SELECT employee_id, bonus, ABS(bonus) AS abs_bonus
FROM employees;

SELECT employee_id, bonus, ABS(bonus) AS abs_bonus
FROM employees;
Q30
Multiple Choice

Which SQL code snippet demonstrates certification-level use of the `EXP` function to calculate the exponential value of the employee's performance score in Oracle?

SQL Code
SELECT employee_id, performance_score, EXP(performance_score) AS exp_value
FROM employees;

SELECT employee_id, performance_score, EXP(performance_score) AS exp_value
FROM employees;

SELECT employee_id, performance_score, EXP(performance_score) AS exp_value
FROM employees;