1. When you use the SELECT clause to list one or two columns only from a Mark for
table and no WHERE clause, which SQL capability is used?
Review
(1) Points
Joining only
Selection only
Correct.
Review
(1) Points
13
10
8 (*)
Correct.
3. The _______ clause can be added to a SELECT statement to return a Mark for
subset of the data.
Review
(1) Points
WHERE (*)
WHICH
ANYWHERE
EVERY
Correct.
4. All computers in the world speak the same languages, so you only need Mark for
to learn one programming language - Oracle SQL. True or False?
Review
(1) Points
True
False (*)
Correct.
5. The basic storage structure in a Relational Database is a _________: Mark for
Review
(1) Points
Key
Field
Row
Table (*)
Correct
Section 2
(Answer all questions in this section)
6. When using the LIKE condition to search for _ symbols, which Mark for
character can you use as the default ESCAPE option?
Review
(1) Points
&
\ (*)
Review
(1) Points
LIKE (*)
IS NULL
IN
BETWEEN...AND...
8. Which of the following WHERE clauses would not select the number Mark for
10?
Review
(1) Points
Correct
9. When using the "LIKE" operator, the % and _ symbols can be used to Mark for
do a pattern-matching, wild card search. True or False?
Review
(1) Points
True (*)
False
Correct
PLAYER_ID NUMBER(9)
LAST_NAME VARCHAR2(20) Review
FIRST_NAME VARCHAR2 (20) (1) Points
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?
Correct.
11. Evaluate this Mark for Review
SELECT
statement:
(1) Points
SELECT *
FROM
employees
WHERE
department_i
d IN(10, 20,
30)
AND salary >
20000;
Which values
would cause
the logical
condition to
return TRUE?
DEPARTMENT_ID = 20 and SALARY = 20000
Correct.
Section 3
(Answer all questions in this section)
12. The conversion function TO_CHAR is a single row function. Mark for
True or False?
Review
(1) Points
True (*)
False
Correct
13. Which of the following is earliest in the rules of precedence? Mark for
Review
(1) Points
Comparison condition
Logical condition
Concatenation operator
Correct
14. Which columns can be added to the ORDER BY clause in the Mark for
following SELECT statement? (Choose Three)
Correct
15. You attempt to query the database with this SQL statement: Mark for
Correct.
Section 4
(Answer all questions in this section)
16. Which of the following SQL statements will correctly display the last Mark for
name and the number of weeks employed for all employees in
department 90?
Review
(1) Points
(*)
Correct
1200
1282
1282.25
1300 (*)
Correct
18. What will the following SQL statemtent display? Mark for
Correct
19. You query the database with this SQL statement: Mark for
CONCAT
SUBSTR
LOWER (*)
Correct
Section 5
(Answer all questions in this section)
Review
(1) Points
Correct
21. A table has Mark for Review
the following
definition:
EMPLOYEES( (1) Points
EMPLOYEE_ID
NUMBER(6)
NOT NULL,
NAME
VARCHAR2(2
0) NOT NULL,
MANAGER_ID
VARCHAR2(6)
)
and contains
the following
rows:
(1001, 'Bob
Bevan', '200')
(200,
'Natacha
Hansen', null)
Will the
folloiwng
query work?
SELECT *
FROM
employees
WHERE
employee_id
=
manager_id;
Correct
22. You have been asked to create a report that lists all Mark for
customers who have placed orders of at least $2,500. The
report's date should be displayed using this format:
Day, Date Month, Year (For example, Tuesday, 13 April, 2004 Review
). (1) Points
Which statement should you issue?
(*)
Correct
23. For the given data from Employees (last_name, manager_id) Mark for
what is the result of the following statement:
DATA:( King, null
Kochhar, 100 Review
De Haan, 100 (1) Points
Hunold, 102
Ernst, 103)
SELECT last_name,
DECODE(manager_id, 100, 'King', 'A N Other') "Works For?"
FROM employees
King, A N Other
Kochhar, King
De Haan, King
Hunold, A N Other
Ernst, A N Other
(*)
Invalid statement.
King, Null
Kochhar, King
De Haan, King
Hunold, A N Other
Ernst, A N Other
King, A N Other
Kochhar, King
De Haan, King
Hunold, Kochhar
Ernst, De Haan
Correct
24. When executed, which statement displays a zero if the Mark for
TUITION_BALANCE value is zero and the HOUSING_BALANCE
value is null?
Review
(1) Points
(*)
Correct
25. If quantity is a number datatype, what is the result of this Mark for
statement?
SELECT NVL(200/quantity, 'zero') FROM inventory;
Review
(1) Points
Null
zero
ZERO
Correct
Section 6
(Answer all questions in this section)
SELECT *
FROM employee e, employee m Review
WHERE e.mgr_id = m.emp_id; (1) Points
Which type of join is created by this SELECT statement?
a cross join
Correct
Review
(1) Points
(*)
Correct
Review
(1) Points
Correct
Review
(1) Points
Columns with the same names must have identical data types.
Columns with the same names must have the same precision and
datatype. (*)
Correct
30. What is another name for a simple join or an inner join? Mark for
Review
(1) Points
Nonequijoin
Equijoin (*)
Self Join
Outer Join
Correct
31. What Mark for Review
types of
joins will
return the (1) Points
unmatche
d values
from both
tables in
the join?
Natural joins
Correct
JOIN admission c
JOIN physician b
ON (a.patient_id = c.patient_id)
Correct
Section 7
(Answer all questions in this section)
33. Nonequijoins are normally used with which of the following? Mark for
(Choose two)
Review
(1) Points
ranges of columns
Ranges of rowids
Ranges of text
Ranges of numbers (*)
Correct
34. You have been asked to create a report that lists all corporate Mark for
customers and all orders that they have placed. The customers
should be listed alphabetically beginning with the letter 'A', and
their corresponding order totals should be sorted from the Review
highest amount to the lowest amount. (1) Points
Which of the following statements should you issue?
(*)
Correct
35. What is the minimum number of join conditions required to join Mark for
5 tables together?
Review
(1) Points
4 (*)
Correct
Section 8
(Answer all questions in this section)
36. Which group function would you use to display the highest salary value Mark for
in the EMPLOYEES table?
Review
(1) Points
MAX (*)
MIN
AVG
COUNT
Correct
37. Which group functions below act on character, number, and date data Mark for
types? (Choose all that are correct.)
Review
(1) Points
COUNT (*)
SUM
MIN (*)
AVG
MAX (*)
Correct
EMPLOYEE_ID NUMBER(9)
LAST_NAME VARCHAR2(20) Review
FIRST_NAME VARCHAR2(20) (1) Points
SALARY NUMBER(7,2)
DEPARTMENT_ID NUMBER(9)
(*)
SELECT COUNT(*)
FROM employees
WHERE salary > 50000
GROUP BY employee_id, last_name, first_name, salary,
department_id;
SELECT COUNT(*)
FROM employees
WHERE salary < 50000;
Correct
Section 9
(Answer all questions in this section)
39. To control the order of rows returned using SET operators, the ORDER Mark for
BY clause is used ______ and is placed in the _____ SELECT statement of
the query.
Review
(1) Points
ONCE; FIRST
IN ALL; LAST
TWICE; FIRST
Correct
40. What will the following SQL Statement do? Mark for
Displays each job id and the number of people assigned to that job
id (*)
Displays all the employees and groups them by job
Displays all the jobs with as many people as there are jobs
Correct
Section 9
(Answer all questions in this section)
41. What is the best explanation as to why this SQL statement will NOT Mark for
execute?
Correct
42. The PRODUCTS table contains these columns: Mark for
PRODUCT_ID NUMBER(9) PK
CATEGORY_ID VARCHAR2(10) Review
LOCATION_ID NUMBER(9) (1) Points
DESCRIPTION VARCHAR2(30)
COST NUMBER(7,2)
PRICE NUMBER(7,2)
QUANTITY NUMBER
You display the total of the extended costs for each product category
by location.
You need to include only the products that have a price less than
$25.00.
The extended cost of each item equals the quantity value multiplied by
the cost value.
Which SQL statement will display the desired result?
(*)
Correct
43. CUBE can be applied to all aggregate functions including AVG, SUM, Mark for
MIN, MAX, and COUNT. True or False?
Review
(1) Points
True (*)
False
Correct
44. If you want to include subtotals and grand totals for all columns Mark for
mentioned in a GROUP BY clause, you should use which of the following
extensions to the GROUP BY clause?
Review
(1) Points
ROLLUP
CUBE (*)
GROUP BY ALL COLUMNS
HAVING
Correct
Section 10
(Answer all questions in this section)
Review
(1) Points
Correct
Section 10
(Answer all questions in this section)
46. Correlated Subqueries must reference the same tables in both the inner Mark for
and outer queries. (True or False?)
Review
(1) Points
True
False (*)
Correct
47. You need to create a SELECT statement that contains a multiple-row Mark for
subquery. Which comparison operator(s) can you use?
Review
(1) Points
BETWEEN AND
LIKE
Correct
What would happen if the inner query returned a NULL value row?
Correct
49. The SQL multiple-row subquery extends the capability of the single-row Mark for
syntax through the use of which three comparison operators?
Review
(1) Points
Correct
50. Single row subqueries may not include this operator: Mark for
Review
(1) Points
<>
ALL (*)
>
Correct