Oracle Database Programming - Section 2
Oracle Database Programming - Section 2
(1) Points
WHERE salary >= 2500 AND salary <= 3500(*)
(1) Points
=, >, <, <=, >=, <>
between ___ and ___
in (..,..,.. )
like
is null
All of the above (*)
Correct
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?
(1) Points
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
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';
4. 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
Correct
5. If you write queries using the BETWEEN operator, it does not matter in
what order you enter the values, i.e. BETWEEN low value AND high value
will give the same result as BETWEEN high value and6. You want to retrieve
a list of customers whose last names begin with the letters 'Fr' . Which
keyword should you include in the WHERE clause of your SELECT statement
to achieve the desired result?
(1) Points
AND
LIKE (*)
IN
BETWEEN
Correct.
7. 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?
(1) Points
SELECT * FROM players;
SELECT team_id, DISTINCT manager_id FROM players;
SELECT team_id, manager_id DISTINCT FROM players;
SELECT team_id, manager_id FROM players;
SELECT DISTINCT team_id, manager_id FROM players; (*)
Correct.
(1) Points
SELECT DISTINCT manager_id, department_id FROM employees;
SELECT manager_id, department_id FROM employees; (*)
SELECT manager_id, DISTINCT department_id FROM employees;
SELECT manager_id, department_id DISTINCT FROM employees;
Correct.
(1) Points
LAST_NAME SALARY
King 5000
LAST_NAME SALARY
Rajas 3500
LAST_NAME SALARY
Davies 3100
(*)
All of the above
Correct
10. 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:
SELECT orderid, orderdate, total
FROM orders;
What should you include in your SELECT statement to achieve the desired
results?
(1) Points
WHERE city = Chicago;
WHERE city = 'Chicago'; (*)
AND city = 'Chicago';
AND city = Chicago;
Correct.
low value. True or False?
Mark for Review
(1) Points
True
False (*)
Correct.
11. The concatenation operator ...
Mark for Review
(1) Points
Brings together columns or character strings into other columns
Creates a resultant column that is a character expression
Is represented by two vertical bars ( || )
All of the above (*)
Correct
(1) Points
Desc and the Describe (*)
Describe
Dis
Desc
Correct
(1) Points
DISTINCT (*)
ONLY
UNIQUEONE
DISTINCTROW
Correct.
(1) Points
Selecting columns from the employees table
Putting a space between first name and last name
Concatenating first name, middle name and last name (*)
Using a column alias
Incorrect. See Section 2 Lesson 1.
15. When using the LIKE condition to search for _ symbols, which character
can you use as the default ESCAPE option?
Mark for Review
(1) Points
^
\ (*)
%
&
Correct.