# Database Programming Section 5 Quiz - Oracle iLearning

Pada kesempatan ini kami akan mengulas tentang dengan judul artikel .

##### Artikel Terkait Oracle iLearning Lainnya
Section 5 Quiz
(Answer all questions in this section)

1.      Which statement will return a listing of last names, salaries, and a rating of 'Low', 'Medium', 'Good' or 'Excellent' depending on the salary value?      Mark for Review
(1) Points

SELECT last_name,salary,
(RATING WHEN salary<5000 THEN 'Low'
WHEN salary<10000 THEN 'Medium'
WHEN salary<20000 THEN 'Good'
ELSE 'Excellent'
END) qualified_salary
FROM employees;

SELECT last_name,salary,
(CASE WHEN salary<5000 THEN 'Low'
WHEN salary<10000 THEN 'Medium'
WHEN salary<20000 THEN 'Good'
ELSE 'Excellent'
END) qualified_salary
FROM employees;
(*)

SELECT last_name,salary,
(CASE WHEN salary<5000 THEN 'Low'
WHEN sal <10000 THEN 'Medium'
WHEN sal <20000 THEN 'Good'
ELSE 'Excellent'
END) qualified_salary
FROM employees;

SELECT last_name,sal,
(CASE WHEN sal<5000 THEN 'Low'
WHEN sal<10000 THEN 'Medium'
WHEN sal<20000 THEN 'Good'
ELSE 'Excellent'
END) qualified_salary
FROM employees;

2.      Which of the following is a conditional expression used in SQL?      Mark for Review
(1) Points

DESCRIBE

CASE (*)

NULLIF

WHERE

3.      CASE and DECODE evaluate expressions in a similar way to IF-THEN-ELSE logic. However, DECODE is specific to Oracle syntax. True or False?      Mark for Review
(1) Points

True (*)

False

4.      Consider the following data in the Employees table: (last_name, commission_pct, manager_id)
DATA:
King, null, null
Kochhar, null, 100
Vargas, null, 124
Zlotkey, .2, 100
What is the result of the following statement:
SELECT last_name, COALESCE(commission_pct, manager_id, -1) comm
FROM employees ;      Mark for Review
(1) Points

King, -1
Kochhar, 100
Vargas, 124
Zlotkey, 100

Statement will fail

King, null
Kochhar, 100
Vargas, 124
Zlotkey, .2

King, -1
Kochhar, 100
Vargas, 124
Zlotkey, .2 (*)

5.      The STYLES table contains this data:
STYLE_ID    STYLE_NAME    CATEGORY    COST
895840    SANDAL    85940    12.00
968950    SANDAL    85909    10.00
869506    SANDAL    89690    15.00
809090    LOAFER    89098    10.00
890890    LOAFER    89789    14.00
857689    HEEL    85940    11.00
758960    SANDAL    86979
Evaluate this SELECT statement:
SELECT style_id, style_name, category, cost
FROM styles
WHERE style_name LIKE 'SANDAL' AND NVL(cost, 0) < 15.00
ORDER BY category, cost;
Which result will the query provide?      Mark for Review
(1) Points

STYLE_ID    STYLE_NAME    CATEGORY    COST
895840    SANDAL    85909    12.00
968950    SANDAL    85909    10.00
869506    SANDAL    89690    15.00
758960    SANDAL    86979

STYLE_ID    STYLE_NAME    CATEGORY    COST
895840    SANDAL    85909    12.00
968950    SANDAL    85909    10.00
758960    SANDAL    86979
869506    SANDAL    89690    15.00

STYLE_ID    STYLE_NAME    CATEGORY    COST
895840    SANDAL    85940    12.00
968950    SANDAL    85909    10.00
758960    SANDAL    86979

STYLE_ID    STYLE_NAME    CATEGORY    COST
968950    SANDAL    85909    10.00
895840    SANDAL    85940    12.00
758960    SANDAL    86979
(*)

(Answer all questions in this section)

6.      The PRODUCT table contains this column: PRICE NUMBER(7,2)
Evaluate this statement:
SELECT NVL(10 / price, '0')
FROM PRODUCT;
What would happen if the PRICE column contains null values?      Mark for Review
(1) Points

The statement would fail because values cannot be divided by null.

The statement would fail because values cannot be divided by 0.

A value of 10 would be displayed.

A value of 0 would be displayed. (*)

7.      Which of the following General Functions will return the first non-null expression in the expression list?      Mark for Review
(1) Points

NVL

NULLIF

NVL2

COALESCE (*)

8.      If quantity is a number datatype, what is the result of this statement?
SELECT NVL(200/quantity, 'zero') FROM inventory;      Mark for Review
(1) Points

zero

The statement fails (*)

Null

ZERO

9.      Which function compares two expressions?      Mark for Review
(1) Points

NULLIF (*)

NVL

NULL

NVL2

10.      Which two statements concerning SQL functions are true? (Choose two.)      Mark for Review
(1) Points

(Choose all correct answers)

Character functions can accept numeric input.

Number functions can return number or character values.

Not all date functions return date values. (*)

Single-row functions manipulate groups of rows to return one result per group of rows.

Conversion functions convert a value from one data type to another data type. (*)

11.      All Human Resources data is stored in a table named EMPLOYEES. You have been asked to create a report that displays each employee's name and salary. Each employee's salary must be displayed in the following format: \$000,000.00. Which function should you include in a SELECT statement to achieve the desired result?      Mark for Review
(1) Points

CHARTOROWID

TO_NUMBER

TO_DATE

TO_CHAR (*)

12.      The EMPLOYEES table contains these columns:
EMPLOYEE_ID NUMBER(9)
LAST_NAME VARCHAR2 (25)
FIRST_NAME VARCHAR2 (25)
HIRE_DATE DATE
You need to display HIRE_DATE values in this format:
January 28, 2000
Which SQL statement could you use?      Mark for Review
(1) Points

SELECT TO_CHAR(hire_date, 'Month DD, YYYY')
FROM employees;
(*)

SELECT TO_CHAR(hire_date, Month DD, YYYY)
FROM employees;

SELECT hire_date(TO_CHAR 'Month DD', ' YYYY')
FROM employees;

SELECT TO_CHAR(hire_date, 'Month DD', ' YYYY')
FROM employees;

13.      Which statement will return the salary (for example, the salary of 6000) from the Employees table in the following format?   \$6000.00      Mark for Review
(1) Points

SELECT TO_CHAR(sal, '\$99999.00') SALARY
FROM employees

SELECT TO_CHAR(salary, '99999.00') SALARY
FROM employees

SELECT TO_CHAR(salary, '\$99999.00') SALARY
FROM employees
(*)

SELECT TO_CHAR(salary, '\$99999') SALARY
FROM employees

14.      Which arithmetic operation will return a numeric value?      Mark for Review
(1) Points

TO_DATE('01-Jun-2004') - TO_DATE('01-Oct-2004') (*)

SYSDATE + 30 / 24

SYSDATE - 6

NEXT_DAY(hire_date) + 5

15.      The EMPLOYEES table contains these columns:
EMPLOYEE_ID NUMBER(9)
LAST_NAME VARCHAR2 (25)
FIRST_NAME VARCHAR2 (25)
SALARY NUMBER(6)
You need to create a report to display the salaries of all employees. Which SQL Statement should you use to display the salaries in format: "\$45,000.00"?      Mark for Review
(1) Points

SELECT TO_NUM(salary, '\$999,999.00')
FROM employees;

SELECT TO_CHAR(salary, '\$999,999')
FROM employees;

SELECT TO_CHAR(salary, '\$999,999.00')
FROM employees;
(*)

SELECT TO_NUM(salary, '\$999,990.99')
FROM employees;

SELAMAT BERJUANG KAWAN………………………………………………………!!!!!!!!

#### Oracle Ilearning for Database Design

Pelajar yang menyelesaikan Desain & Pemrograman Database Oracle Academy dengan kursus SQL dapat sebagai gantinya (atau juga) memilih untuk mempersiapkan dan mengikuti ujian sertifikasi SQL Server SQL Expert. Namun, ujian Oracle Database SQL Expert berisi topik tambahan yang akan membutuhkan lebih banyak belajar mandiri dan berlatih sendiri untuk mempersiapkan.

Membutuhkan penyelesaian yang berhasil sebelum Ujian Sertifikasi Oracle Database SQL Expert, Pengantar Oracle Ujian Sertifikasi SQL, atau Oracle Database : Ujian Sertifikasi SQL Fundamentals.

Di atas adalah soal dan jawaban kuis oracle ilearning - oracle academy, sebagai penambah ilmu pengetahuan untuk kita semua, yang pada intinya jangan lupa untuk dipahami dan dikuasai.

#### Pembahasan didalam Oracle Ilearning - Oracle Academy

• Oracle Ilearning for Database Design

• Oracle Ilearning for Course Resources

• Oracle Ilearning for Introduction

• Oracle Ilearning for Entities and Attributes

• Oracle Ilearning for Relationship Basics

• Oracle Ilearning for Super/Sub Types and Business Rules

• Oracle Ilearning for Relationship Fundamentals

• Oracle Ilearning for UIDs and Normalization

• Oracle Ilearning for Arcs, Hierarchies, and Recursive Modeling

• Oracle Ilearning for Changes and Historical Modeling

• Oracle Ilearning for Mapping

• Oracle Ilearning for Creating Database Projects

• Oracle Ilearning for Presenting Database Projects

• Oracle Ilearning quiz answers for Database Design English Quizzes and Exams

• Oracle Ilearning quiz answers for Database Design Midterm Exam

• Oracle ilearning quiz answers for Database Design Final Exam

Tag : oracle academy quiz answers, oracle ilearning quiz answers, oracle academy certification, oracle academy training, soal dan jawaban kuis oracle, jawaban kuis oracle academy, jawaban kuis oracle ilearning, kunci jawaban oracle academy, kunci jawaban oracle ilearning.

Selain Sebagai Penyedia Panduan Belajar Database dan Tutorial Pemrograman, Kami Juga Membagikan Kumpulan Source Code Program Aplikasi dan Ebook Pemrograman Terlengkap yang Bisa Anda Dapatkan Secara Gratis di Halaman :

#### Penelusuran terkait Oracle iLearning

##### Berlangganan artikel
Daftarkan e-mail Anda dibawah ini
Selanjutnya cek e-mail untuk verifikasi.