# Adrian Tudor Web Designer and Programmer

Archive for the ‘Oracle Quiz’ Category

## Final Exam Design

And Final Exam Design

## Section 17 – Introduction to Functions

1. The function COUNT is a single row function. True or False?

True
False(*)

2. The following statement represents a multi-row function. True or False?

SELECT MAX(salary)
FROM employees

True(*)
False

3. The conversion function TO_CHAR is a single row function. True or False?

True(*)
False

4. Will the following statement return one row?

SELECT MAX(salary), MIN(Salary), AVG(SALARY)
FROM employees;

No, it is illegal. You cannot use more than one multi-row function in a SELECT statement
Yes, it will return … Read the rest

## Section 17 – Sorting Rows

1. A column alias can be specified in an ORDER BY Clause. True or False?

True(*)
False

2. What clause must you place in a SQL statement to have your results sorted from highest to lowest salary?

ORDER BY salary ASC
ORDER BY salary DESC(*)
ORDER salary BY DESC
None, the database always sorts from highest to lowest on the salary column.

3. What columns can be added to the following SELECT statement in its ORDER BY clause? (Choose Three)… Read the rest

## Section 17 – Logical Comparisons and Precedence Rules

1. Which symbol in the WHERE clause means “Not Equal To”? (Choose Two)

NOT IN (…) (*)
=+
(*)
< 2. Which of the following would be returned by this SQL statement: SELECT First_name, last_name, department_id FROM employees WHERE department_id IN(50,80) AND first_name LIKE ‘C%’ OR last_name LIKE ‘%s%’ FIRST_NAME LAST_NAME DEPARTMENT_ID Shelly Higgins 110 FIRST_NAME LAST_NAME DEPARTMENT_ID Curtis Davies 50 FIRST_NAME LAST_NAME DEPARTMENT_ID Randall Matos 50 FIRST_NAME LAST_NAME DEPARTMENT_ID Michael Hartstein 20 All of the above(*) 3. Find the clause that will give the same results as: SELECT * FROM d_cds WHERE cd_number NOT IN(90, 91, 92); WHERE cd_id <=90 and cd_id >=92;
WHERE cd_id NOT LIKE (90, 91, 92);
WHERE cd_id != 90 and cd_id != 91 and cd_id != 92;(*)
WHERE cd_id != 90 or cd_id != 91 or cd_id!= 92;

4. Which of the following is earliest in the rules of precedence?

Concatenation operator
Logical condition
Comparison condition
Arithmetic operator(*)

5. Which of the following statements best describes the rules … Read the rest

## Section 16 – Comparison Operators

1. Which statement would select salaries that are greater than or equal to 2500 and less than or equal to 3500? Choose two correct answers.

WHERE salary = 2500 AND salary < = 3500(*) WHERE salary <=2500 AND salary >= 3500
WHERE salary BETWEEN 2500 AND 3500(*)
WHERE salary BETWEEN 3500 AND 2500

2. Which of the following are examples of comparison operators used in the WHERE clause?

=, , < , <=, >=,
between ___ and ___
in (..,..,.. )
like
is null
All of the above(*)

3. Which of … Read the rest

## Section 16 – Limit Rows Selected

1. Which of the following statements will work?

SELECT first_name ||’ ‘||last_name NAME, department_id DEPARTMENT, salary*12 “ANNUAL SALARY”
FROM employees
WHERE name = ‘King’;
SELECT first_name ||’ ‘||last_name NAME, department_id DEPARTMENT, salary*12 “ANNUAL SALARY”
FROM employees
WHERE last_name = ‘King’;(*)
SELECT first_name ||’ ‘||last_name NAME, department_id DEPARTMENT, salary*12 ‘ANNUAL SALARY’
FROM employees
WHERE last_name = ‘King’;
SELECT first_name ||’ ‘||last_name NAME, department_id DEPARTMENT, salary*12 ‘ANNUAL SALARY’
FROM employees
WHERE name = ‘King’;

2. How can you write not equal to … Read the rest

## Section 16 – Working with Columns, Characters, and Rows

1. Which of the following is NOT BEING DONE in this SQL statement?

SELECT first_name || ‘ ‘ || last_name “Name”
FROM employees;

Concatenating first name, middle name and last name(*)
Putting a space between first name and last name
Selecting columns from the employees table
Using a column alias

2. The concatenation operator …

Brings together columns or character strings into other columns
Creates a resultant column that is a character expression
Is represented by two vertical bars ( … Read the rest

## Section 15 – Relational Database Technology

1. The following table creation statement is valid. True or False?

CREATE TABLE country (
ID NUMBER(6) NOT NULL,
NAME VARCHAR2(30) NOT NULL,
LOC VARCHAR2(40),
REG_ID NUMBER,
NAME VARCHAR2(25))

True
False(*)

2. The following statements are true regarding tables in a RDBMS: (Choose Two)

A table is a logical object only. They cannot be created in a RDBMS.
A table holds all the data necessary about something in the real world, such as employees, invoices or customers.(*)
Tables contain fields, … Read the rest

## Section 15 – Anatomy of a SQL Statement

1 Comment, Oracle Quiz, by admin.

1. The order of operator precedence is

/ + – *
* – + /
* / + – (*)
None of the above

2. If you want to see all columns of data in a table, you use what symbol?

&
%
\$
* –

3. SELECT * FROM departments; is a:

Keyword
Statement (*)
Declaration
Strategy

4. The SQL SELECT statement is capable of:

Selection and protection
Selection and projection(*)
Projection and updating
None of the above

## Section 13 – System Development Life Cycle

1. The data model can be used to…

Communicate and group
Describe and specify
Analyze and copy
All of the Above(*)

2. During which phases of the System Development Life Cycle would you roll out the system to the users?

Build and Transition
Strategy and Analysis
Design and Production
Transition and Production(*)

3. In which phases of the System Development Life Cycle will we need to use SQL as a language? (Choose Two)

Analysis
Transition(*)
Strategy
Build and Document(*)… Read the rest