Você está na página 1de 5

Skip to content

Selembar kertas kehidupan


Quran
Pemuda Hijrah
Languange
Arabic
Turkey
English
IT
Materi
Coding

Quiz 2.1 Database�Programming


14 Januari 2017
by sheghet45
, posted in Materi

You need to display employees with salaries that are at least 30000 or higher.
Which comparison operator should you use? Mark for Review
(1) Points
�=>�
>= (*)
>
!=
Correct Correct.
2. When using the LIKE condition, which symbol represents any sequence of
characters of any length�zero, one, or more characters? Mark for Review
(1) Points
#
&
% (*)
_
Incorrect Incorrect. See Section 2 Lesson 1.

3. Which comparison operator searches for a specified character pattern? Mark for
Review
(1) Points
IN
BETWEEN�AND�
IS NULL
LIKE (*)
Correct Correct.
4. What does the DISTINCT keyword do when it is used in a SELECT clause? Mark for
Review
(1) Points
Hides NULL values
Eliminates only unique rows in the result
Eliminates all unique values and compares values
Eliminates duplicate rows in the result (*)
Correct Correct.
5. You need to display all the rows in the EMPLOYEES table that contain a null
value in the DEPARTMENT_ID column. Which comparison operator should you use? Mark
for Review
(1) Points
ISNULL
IS NULL (*)
NULL!
�= NULL�
Correct Correct.
====================================================
6. The PLAYERS table contains these columns:
PLAYER_ID NUMBER(9)
LAST_NAME VARCHAR2(20)
FIRST_NAME VARCHAR2 (20)
TEAM_ID NUMBER (4)
MANAGER_ID NUMBER (9)
POSITION_ID NUMBER (4)
Which SELECT statement should you use if you want to display unique combinations of
the TEAM_ID and MANAGER_ID columns?
Mark for Review
(1) Points
SELECT * FROM players;
SELECT DISTINCT team_id, manager_id FROM players; (*)
SELECT team_id, manager_id FROM players;
SELECT team_id, DISTINCT manager_id FROM players;
SELECT team_id, manager_id DISTINCT FROM players;
Incorrect Incorrect. See Section 2 Lesson 2.
7. Which SELECT statement will display both unique and non-unique combinations of
the MANAGER_ID and DEPARTMENT_ID values from the EMPLOYEES table? Mark for Review
(1) Points
SELECT DISTINCT manager_id, department_id FROM employees;
SELECT manager_id, department_id DISTINCT FROM employees;
SELECT manager_id, DISTINCT department_id FROM employees;
SELECT manager_id, department_id FROM employees; (*)
Incorrect Incorrect. See Section 2 Lesson 2.
8. What will be the result of the SELECT statement and what will display?
SELECT last_name, salary, salary + 300
FROM employees;
Mark for Review
(1) Points
Display the last name, salary, and the results of adding 300 to the salary of the
first employee row
Display the last name, salary, and the results of adding 300 to each salary for all
the employees (*)
Display the last name and salary of all employees who have a salary greater than
300.
Modify the salary column by adding 300 and only display the last name and the new
salary.
Correct Correct.
9. Which example would limit the number of rows returned? Mark for Review
(1) Points
SELECT title FROM d_songs WHERE type_code = 88; (*)
SELECT title FROM d_songs WHERE type_code = = 88;
SELECT title FROM d_songs WHEN type_code = = 88;
SELECT title FROM d_songs WHEN type_code = 88;
Correct Correct
10. To restrict the rows returned from an SQL Query, you should use the _____
clause: Mark for Review
(1) Points
SELECT
WHERE (*)
GROUP BY
CONDITION
All of the Above
Incorrect Incorrect. See Section 2 Lesson 2.
======================================================
The EMPLOYEES table includes these columns:
EMPLOYEE_ID NUMBER(4) NOT NULL
LAST_NAME VARCHAR2(15) NOT NULL
FIRST_NAME VARCHAR2(10) NOT NULL
HIRE_DATE DATE NOT NULL
You want to produce a report that provides the last names, first names, and hire
dates of those employees who were hired between March 1, 2000, and August 30, 2000.
Which statements can you issue to accomplish this task?
Mark for Review
(1) Points
SELECT last_name, first_name, hire_date
FROM employees
WHERE hire_date BETWEEN �01-Mar-2000' AND �30-Aug-2000';
(*)
SELECT last_name, first_name, hire_date
FROM employees
GROUP BY hire_date >= �01-Mar-2000' and hire_date <= �30- Aug-2000';
SELECT last_name, first_name, hire_date
FROM employees
WHERE hire_date BETWEEN �30-Aug-2000' AND �01-Mar-2000';
SELECT last_name, first_name, hire_date
FROM employees
AND hire_date >= �01-Mar-2000' and hire_date <= �30-Aug-2000';
Correct Correct.
12. Which two statements would select salaries that are greater than or equal to
2500 and less than or equal to 3500? (Choose two) Mark for Review
(1) Points
(Choose all correct answers)
WHERE salary >= 2500 AND salary <= 3500 (*)
WHERE salary <=2500 AND salary >= 3500
WHERE salary BETWEEN 3500 AND 2500
WHERE salary BETWEEN 2500 AND 3500 (*)
Incorrect Incorrect. See Section 2 Lesson 3.
13. The EMPLOYEES table contains these columns:
LAST_NAME VARCHAR2(25)
FIRST_NAME VARCHAR2(25)
EMAIL VARCHAR2(50)
You are writing a SELECT statement to retrieve the names of employees that have an
email address.
SELECT last_name||�, �||first_name �Employee Name�
FROM employees;
Which WHERE clause should you use to complete this statement?
Mark for Review
(1) Points
WHERE email = NULL;
WHERE email IS NOT NULL; (*)
WHERE email != NULL;
WHERE email IS NULL;
Incorrect Incorrect. See Section 2 Lesson 3.
14. When using the �LIKE� operator, the % and _ symbols can be used to do a
pattern-matching, wild card search. True or False? Mark for Review
(1) Points
True (*)
False
Incorrect Incorrect. See Section 2 Lesson 3.
15. Which of the following WHERE clauses would not select the number 10? Mark for
Review
(1) Points
WHERE hours <= 10
WHERE hours BETWEEN 10 AND 20
WHERE hours <>10 (*)
WHERE hours IN (8,9,10)
Incorrect Incorrect. See Section 2 Lesson 3.
=====================================================
Iklan

Bagikan ini:
TwitterFacebookGoogle

Terkait
Quiz 11 Database Programming
dalam "Materi"
Quiz 2.2 Database Programming
dalam "Materi"
Midle Test Database Programming
dalam "Materi"

Navigasi pos
Previous post
Quiz 01 Database�Programming
Next post
Quiz 2.2 Database�Programming
Tinggalkan Balasan

Search
Cari untuk:

Jadwal Shalat

Kalender Hijriah

Kalender
Januari 2017
S
S
R
K
J
S
M




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

Galeri

New Post
Samudra Cinta Para�Ulama
Majelis Kopi Hitam Setengah Gelas�(50)
180
Instagram
Terjadi error saat mengambil gambar dari Instagram. Upaya akan diulangi beberapa
menit lagi.
Twitter Timeline

Ikuti Blog melalui Email


Masukkan alamat surat elektronik Anda untuk mengikuti blog ini dan menerima
pemberitahuan tentang pos baru melalui surat elektronik.

�..

Blog di WordPress.com.

Ikuti

Você também pode gostar