Quiz DP 2
Quiz DP 2
True
False (*)
2. 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 BETWEEN 2500 AND 3500 (*)
Correct
3. Which of the following WHERE clauses would not select the number 10?
Mark for Review
(1) Points
WHERE hours BETWEEN 10 AND 20
Correct
4. Which of the following are examples of comparison operators used in the WHERE
clause? Mark for Review
(1) Points
=, >, <, <=, >=, <>
in (..,..,.. )
like
is 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?
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.
Section 2 Quiz
(Answer all questions in this section)
6. Where in a SQL statement can you not use arithmetic operators?
Mark for Review
(1) Points
WHERE
SELECT
FROM (*)
NONE
Correct.
7. You need to display employees whose salary is in the range of 10000 through 25000
for employees in department 50 . What does the WHERE clause look like? Mark for Review
(1) Points
WHERE department_id = 50
AND salary BETWEEN 10000 AND 25000
(*)
WHERE department_id = 50
AND salary BETWEEN 25001 AND 10001
WHERE department_id > 50
AND salary BETWEEN 10000 AND 25000
WHERE department_id < 50
AND salary BETWEEN 10000 AND 25000
Correct.
A constant
A column name
Correct.
9. The structure of the table can be displayed with the _________ command:
Mark for Review
(1) Points
Dis
Desc
Describe
Correct
10. 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.
Section 2 Quiz
(Answer all questions in this section)
11. You want to determine the orders that have been placed by customers who reside in
the city of Chicago. You write this partial SELECT statement: Mark for Review
(1) Points
SELECT orderid, orderdate, total
FROM orders;
What should you include in your SELECT statement to achieve the desired results?
AND city = 'Chicago';
Correct.
12. You need to display all the employees whose last names (of any length) start with the
letters 'Sm' . Which WHERE clause should you use? Mark for Review
(1) Points
WHERE last_name LIKE 'Sm%' (*)
Correct.
How will the heading for the FIRST_NAME column appear in the display by default in
Oracle Application Express?
The heading will display with the first character capitalized and left justified.
The heading will display with the first character capitalized and centered.
14. You need to display all the values in the EMAIL column that contains the underscore
(_) character as part of that email address. The WHERE clause in your SELECT Mark for Review
statement contains the LIKE operator. What must you include in the LIKE operator? (1) Points
The ESCAPE option (\) and one or more percent signs (%) (*)
Correct