0% found this document useful (0 votes)
511 views

SQL Quiz

The document discusses relationships in relational database management systems (RDBMS) and Oracle Database 12c features. It provides multiple choice questions about RDBMS concepts like relationships, database architecture, benefits of 12c, and database objects. The questions cover topics like relationship types, database definitions, 12c implementation architectures, and database administration commands.

Uploaded by

Pravin Poudel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
511 views

SQL Quiz

The document discusses relationships in relational database management systems (RDBMS) and Oracle Database 12c features. It provides multiple choice questions about RDBMS concepts like relationships, database architecture, benefits of 12c, and database objects. The questions cover topics like relationship types, database definitions, 12c implementation architectures, and database administration commands.

Uploaded by

Pravin Poudel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 138

Which of the following relationships do not exist in RDBMS?

One-to-many
B

One-to-one
C

Many-to-one
D

Many-to-many

Which architecture in the Oracle Database 12c implementation guards against unplanned


machine downtime?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

None of these
B

Consolidate multiple databases and instances to one server


C

Real Application Clusters


D

Multitenancy Container Database


Which of the following collects data, stores and organizes data, and retrieves related data used by
a business?
A

Structure
B

Database
C

Entity

Operation

Which of the following are main benefits of the cloud oriented architecture of Oracle Database
12c? (Choose all that apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

The ability to easily expand compute resources with Oracle RAC.


B

The ability to handle many different data types.


C

The ability to handle many different character sets.


D

Oracle SQL*Plus was introduced to make database administration earlier.


E

More efficient sharing of resources.


look at the diagram. What kind of relationship exists between MOVIES and CHARACTERS?

Figure A
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Each movie may have one or more characters.


B

Each movie must have one or more characters.


C

Many movies may have many characters.


D

One movie can have only one character.


Question 6 :In the physical implementation of RDBMS, which database object is used to
represent unique identifiers?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Index
B

Any constraint
C

Foreign key
D

Primary key

Question 7 :Which of the following is not possible in an Oracle relational database?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Referential integrity
B

Consistent reads
C

Dirty reads
D

None of these
E

Use of triggers to implement business rules


Which of the following database models is based on first-order predicate logic?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Hierarchical
B

Network
C

Relational
D

Flat

Question 9 :Which of the following is NOT a feature of Oracle Database 12c?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

IPL Capabilities
B

Pluggable databases
C

Process Threads
D

Temporary Undo
Which of the following is a collection of database objects owned by a user account in the
database?
A

Instance
B

Schema
C

Structure
D

Operation

Which of the following best describes the purposes of a relational database like Oracle? (Choose
all that apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

To collect data
B

To store data
C

To retrieve data
D

To maintain the order of data within the tables of the database.


E

To organize data
In which of the following architectures do more than one instance communicate to a single
database?
A

PDB

CDB
C

RAC
D

DBMS

Which of the following RMAN commands will allow you to retrieve repair options that include
both automated and manual repair options?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

VIEW FAILURE
B

REPAIR FAILURE
C

LIST FAILURE
D

ADVISE FAILURE
Question 14 :Which of the following are main benefits of Oracle Database 12c? (Choose all that
apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Oracle SQL*Plus was introduced to make database administration easier.


B

Compression and storage tiering make for more efficient use of available
storage.
C

Multiple databases can be consolidated into one instance.


D

Oracle RMAN was introduced making backup and recovery easier.

Which SQL command adds text to the end of a line?


A

LIST
B

APPEND
C

INPUT
D

DESCRIBE
Question 16 :Which connection method to the Oracle database is known as the easy connect?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Neither <username>@<connect_string> or <username>@<host>:<port>/<service_name>
B
<username>@<connect_string>
C
<username>@<host>:<port>/<service_name>
D

Both <username>@<connect_string> and <username>@<host>:<port>/<service_name>

Which of the following terms used in relational theory is referred to as a column data type?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Tuple
B

Attribute value
C

Entity
D

Domain
Which statement about the object type is true?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

They are structures that consist of built-in or user-defined data types.


B

They are structures that consist of only built-in data types.


C

They are structures that consist of only user-defined data types.


D

Only one column in a table can be object type.

Which of the following is part of Oracle's support for a relational RDBMS?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Use of integrity constraints.


B

Use of table, views and indexes.


C

Use of the concept of transactions.


D

All of these.
E

Use of triggers to implement business rules.


Question 20 :Which of the following elements in the database management system manages
memory and storage?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Query Language
B

Metadata Repository
C

Kernel code
D

Row Pattern Matching

Which one of the following Oracle SQL*Plus command lines is not valid?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
sqlplus <username>
B
sqlplus
C
sqlplus <username>@<connect_string>
D
sqlplus @<connect_string>
SQL Developer is a tool primarily for whom?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Database administrators
B

End users
C

Application developers
D

All of these

Question 23 :Which normal form states that a non-key field should NOT be partially dependent
on a multi-valued primary key?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Fourth normal form


B

First normal form


C

Second normal form


D

Third normal form


Which of the following SQL commands obtains information about database objects?
A

CHANGE

DESCRIBE
C

APPEND
D

INPUT

Which database tools are parts of Oracle Database 12c? Choose two.
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Oracle Enterprise Manager Cloud Control 12c


B

TOAD (Tool for Oracle Application Developers)


C

SQL Developer
D

Oracle Enterprise Manager Database Express 12c


Which of the following collects data, stores and organizes data, and retrieves related data used by
a business?
A

Database
B

Structure
C

Operation

Entity

Question 4 :Which of the following database models is based on first-order predicate logic?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Hierarchical
B

Flat
C

Relational
D

Network
Which of the following terms used in relational theory is referred to as a column data type?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Domain
B

Entity
C

Attribute value
D

Tuple

Question 6 :Which of the following normal forms states that all rows must have atomic values?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Third normal form


B

Second normal form


C

Fourth normal form


D

First normal form


Which normal form states that a non-key field should NOT be partially dependent on a multi-
valued primary key?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

First normal form


B

Second normal form


C

Third normal form


D

Fourth normal form

Which of the following contains a set of memory structures and processes that uses the physical
components to manipulate and retrieve data?
A

Structure
B

Database
C

Instance
D

Operation
In which of the following architectures do more than one instance communicate to a single
database?
A

CDB
B

RAC
C

DBMS

PDB

Which of the following is a collection of database objects owned by a user account in the
database?
A

Instance
B

Schema
C

Structure
D

Operation
___________ is a graphical tool used to perform everyday activities in the Oracle database.
A

SQL *Plus
B

RDBMS
C

SQL Developer

OEM Database Express 12c

______________ is an Oracle's command-line interface to the Oracle database.


A

SQL Developer
B

SQL *Plus
C

RDBMS

OEM Cloud Control 12c


Which of the following is NOT a feature of Oracle Database 12c?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Pluggable databases
B

Process Threads
C

Temporary Undo
D

IPL Capabilities

Which of the following RMAN commands will allow you to retrieve repair options that include
both automated and manual repair options?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

ADVISE FAILURE
B

LIST FAILURE
C

REPAIR FAILURE
D

VIEW FAILURE
Question 15 :
Which of the following SQL commands obtains information about database objects?
A

DESCRIBE
B

APPEND
C

INPUT

CHANGE

Which SQL command adds text to the end of a line?


A

DESCRIBE
B

INPUT
C

APPEND
D

LIST
Look at the diagram. What kind of relationship exists between MOVIES and CHARACTERS?

Figure A
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Each movie may have one or more characters.


B

Each movie must have one or more characters.


C

Many movies may have many characters.


D

One movie can have only one character.


When the physical model is being designed from the logical model, which element may be
attributed as a table from the ER diagram?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Relationship
B

Attribute
C

Unique identifier
D

Entity

Which statement about the object type is true?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

They are structures that consist of built-in or user-defined data types.


B

They are structures that consist of only built-in data types.


C

They are structures that consist of only user-defined data types.


D

Only one column in a table can be object type.


Question 4 :In the physical implementation of RDBMS, which database object is used to
represent unique identifiers?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Any constraint
B

Index
C

Primary key
D

Foreign key

Which of the following is not a benefit of Oracle Database 12c?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Manage multiple databases as one


B

Fast provisioning of cloned databases


C

Plug and unplug databases


D

Patch each pluggable database separately


Which database tools are parts of Oracle Database 12c? Choose two.
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Oracle Enterprise Manager Cloud Control 12c


B

Oracle Enterprise Manager Database Express 12c


C

SQL Developer
D

TOAD (Tool for Oracle Application Developers)

Question 7 :Which architecture in the Oracle Database 12c implementation guards against


unplanned machine downtime?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Multitenancy Container Database


B

Real Application Clusters


C

Consolidate multiple databases and instances to one server


D

None of these
Which connection method to the Oracle database is known as the easy connect?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
<username>@<connect_string>
B
<username>@<host>:<port>/<service_name>
C

Both <username>@<connect_string> and <username>@<host>:<port>/<service_name>
D

Neither <username>@<connect_string> or <username>@<host>:<port>/<service_name>

Which one of the following Oracle SQL*Plus command lines is not valid?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
sqlplus <username>
B
sqlplus @<connect_string>
C
sqlplus <username>@<connect_string>
D
sqlplus
Which of the following is a tool available in Oracle Database 12c that you can use to issue SQL
statements? (Choose all that apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Oracle SQL Developer


B

Data Pump
C

SQL Loader
D

SQL*PLUS
E

Listener

Which connection method to the Oracle database is known as the easy connect?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Neither <username>@<connect_string> or <username>@<host>:<port>/<service_name>
B
<username>@<connect_string>
C
<username>@<host>:<port>/<service_name>
D

Both <username>@<connect_string> and <username>@<host>:<port>/<service_name>
Figure: A

Which of the following is correct related the ERD above?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

The diagram indicates that there is a many-to-many relationship between the


employees table and the stores table.
B

The diagram indicates that there are none, one or more rows in the
employees table that are related to one or many rows in the stores table.
C

The diagram indicates that for each row in the stores table there must be one
or more rows in the employees table.
D

The diagram indicates that for each row in the stores table there must be one,
and only one, row in the employees table.
E

The diagram indicates that there is no relationship between the employees


table and the stores table.
CHAPTER 2

Which of the following operators will be evaluated first in a SELECT statement?

SELECT (2+3*4/2-5) FROM dual;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

-
B

+
C

/
D

Question 2 :Which of the following statements is used to retrieve data from a database?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT
B

UPDATE
C

DELETE
D

DROP
Question 3 :In which of the following clauses will you include all the table names separated by
commas?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

ALTER
B

WHERE
C

FROM
D

IN

Question 4 :Which of the following is used to retrieve all records from a table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

%
B

*
C

&
D

@
Which of the following clauses is used to prevent rows from getting duplicated in the result set?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

DISTINCT
B

ORDER BY
C

UPDATE
D

GROUP BY

Question 6 :In which of the following clauses will you define the relationship between the tables
listed in the FROM clause using comparison operators?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

WHERE
B

LIKE
C

FROM
D

SELECT
Which of the following clauses specifies a search condition to restrict the rows returned?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

LIKE
B

BETWEEN
C

WHERE
D

DROP

Question 8 :Which of the following clauses is used to determine the values that will be returned
in the resultset?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

WHERE
B

HAVING
C

ORDER BY
D

GROUP BY
Question 9 :Which of the following will return the names and departments of all employees who
earn a salary of more than 100000?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT name, department FROM employee_table WHERE salary !=


100000;
B

SELECT name, department FROM employee_table WHERE salary < 100000;


C

SELECT name, department FROM employee_table WHERE salary > 100000;


D

SELECT name, department FROM employee_table WHERE salary >=


100000;

Which of the following operators tests whether or not a value exists in a list of values?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

BETWEEN
B

IN
C

LIKE
D

EXISTS
Which of the following operators evaluates to TRUE if the value does not exist in the list or the
result set from a subquery?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

NOT IN
B

IN
C

NOT EXISTS
D

EXISTS

Which of the following operators tests whether or not a value lies within a range of values?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

BETWEEN
B

IN
C

LIKE
D

EXISTS
Question 13 :Which of the following operators tests whether or not a subquery returns rows?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

NOT IN
B

BETWEEN
C

EXISTS
D

IN

Which of the following operators is a comparison operator used for pattern matching?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

EXISTS
B

BETWEEN
C

IN
D

LIKE
Which of the following clauses of the SQL statement sorts the items in the result set prior to
returning them to the user?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

WHERE
B

HAVING
C

GROUP BY
D

ORDER BY

Question 16 :Which of the following SQL statements selects all rows from a table
named Sales and orders the result set by the City column?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT City FROM Sales;


B

SELECT * FROM Sales GROUP BY City;


C

SELECT * FROM Sales ORDER BY City;


D

SELECT City FROM Sales WHERE City > 1000;


Which of the following is the default value of the ORDER BY clause to sort the result set?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

BOTTOM
B

TOP
C

DESC
D

ASC

Which of the following clauses is used to sort the records in your result set?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

ORDER BY
B

GROUP BY
C

HAVING
D

WITH
In which of the following clauses will you list the columns you are interested in from all the
related tables?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

CREATE
B

SELECT
C

FROM
D

WHERE

Which of the following capabilities refers to the restriction of tuples or rows from a table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Projection
B

Selection
C

Joining
D

Sorting
Question 21 :Which of the following filters the SELECT statement to choose only the rows that
you want to be returned?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Sorting
B

Joining
C

Projection
D

Selection

Which of the following terms refers to an element in a select list that is not a column?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Expression
B

Statement
C

Literal
D

Keyword
Which of the following statements is NOT true about the HAVING clause?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

It was added to SQL because the WHERE clause could not be used with
aggregate functions.
B

It specifies filtering conditions that work on groups.


C

It cannot be specified without a GROUP BY clause.


D

It is the last clause to be specified in any SQL query.

You issue the following query:

1. SELECT salary "Employee Salary"


2. FROM employees;

How will the column heading appear in the result?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

EMPLOYEE SALARY
B

EMPLOYEE_SALARY
C

Employee Salary
D

employee_salary
The EMP table is defined as follows:

Figure: A

You perform the following two queries:

1. SELECT empno enumber, ename FROM emp ORDER BY 1;


2. SELECT empno, ename FROM emp ORDER BY empno ASC;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Statements 1 and 2 will produce the same result in data.


B

Statement 1 will execute; statement 2 will return an error.


C

Statement 2 will execute; statement 1 will return an error.


D

Statements 1 and 2 will execute but produce different results.


The EMP table has the following data:

Figure A

You issue the following SELECT statement on the EMP table.

1. SELECT (200+((salary*0.1)/2)) FROM emp;

What will happen to the result if all the parentheses are removed?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

No difference, because the answer will always be NULL.


B

No difference, because the result will be the same.


C

The result will be higher.


D

The result will be lower.


In the following SELECT statement, which component is a literal? (Choose all that apply.)

1. SELECT 'Employee Name: ' || ename


2. FROM emp WHERE deptno = 10;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

10
B

ename
C

Employee Name:
D

||
The EMP table has the following data:

Figure A

What will happen if you query the EMP table with the following?

1. SELECT empno, DISTINCT ename, salary


2. FROM emp;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

EMPNO, unique values of ENAME, and then SALARY are displayed.


B

EMPNO and unique values of the two columns, ENAME and SALARY, are displayed.


C

DISTINCT is not a valid keyword in SQL.


D

No values will be displayed because the statement will return an error.


Question 6 :Which clause in a query restricts the rows selected?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

ORDER BY
B

WHERE
C

SELECT
D

FROM

The following listing shows the records of the EMP table:

Figure: A

When you issue the following query, which value will be displayed in the first row?

SELECT empno
FROM emp
WHERE deptno = 10
ORDER BY ename DESC;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

MILLER
B

7934
C

7876
D

No rows will be returned because ename cannot be used in the ORDER BY


clause

The following listing shows the records of the EMP table:

Figure A

How many rows will the following query return?


1. SELECT * FROM emp WHERE ename BETWEEN 'A' AND 'C'

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

4
B

2
C

A character column cannot be used in the BETWEEN operator.


D

The EMP table is defined as follows:

Figure A
When you issue the following query, which line has an error?

DescribeListen
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

1
B

5
C

4
D

No error; the statement will finish successfully.

You issue the following query:

1. SELECT empno, ename


2. FROM emp
3. WHERE empno = 7782
4. OR empno = 7876;

Which other operator can replace the OR condition in the WHERE clause?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
IN
B

BETWEEN ... AND ...


C

LIKE
D

<=
E

>=

Which statement searches for PRODUCT_ID values that begin with DI_ from the ORDERS table?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT * FROM ORDERS


WHERE PRODUCT_ID = 'DI%';
B

SELECT * FROM ORDERS


WHERE PRODUCT_ID LIKE 'DI_' ESCAPE '\';
C

SELECT * FROM ORDERS


WHERE PRODUCT_ID LIKE 'DI\_%' ESCAPE '\';
D

SELECT * FROM ORDERS


WHERE PRODUCT_ID LIKE 'DI\_' ESCAPE '\';
E

SELECT * FROM ORDERS


WHERE PRODUCT_ID LIKE 'DI_%' ESCAPE '\';
Question 12 :COUNTRY_NAME and REGION_ID are valid column names in the COUNTRIES table.
Which one of the following statements will execute without an error?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT country_name, region_id,CASE region_id = 1 THEN 'Europe', region_id = 2 THEN


'America', region_id = 3 THEN 'Asia', ELSE 'Other' END ContinentFROM countries;
B

SELECT country_name, region_id,CASE (region_id WHEN 1 THEN 'Europe', WHEN 2 THEN


'America', WHEN 3 THEN 'Asia', ELSE 'Other') ContinentFROM countries;
C

SELECT country_name, region_id,CASE region_id WHEN 1 THEN 'Europe' WHEN 2 THEN


'America' WHEN 3 THEN 'Asia' ELSE 'Other' END ContinentFROM countries;
D

SELECT country_name, region_id,CASE region_id WHEN 1 THEN 'Europe' WHEN 2 THEN


'America' WHEN 3 THEN 'Asia' ELSE 'Other' ContinentFROM countries;

The EMPLOYEE table has the following data:

Figure A

What will be the value in the first row of the result set when the following query is executed?
1. SELECT hire_date FROM employee ORDER BY salary, emp_name;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
02-APR-91
B
17-DEC-90
C
28-SEP-91
D

The query is invalid, because you cannot have a column in the ORDER BY clause
that is not part of the SELECT clause.

Which SQL statement will query the EMPLOYEES table for FIRST_NAME, LAST_NAME,


and SALARY of all employees in DEPARTMENT_ID 40 in the alphabetical order of last name?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT first_name last_name salary FROM employees ORDER BY last_name WHERE


department_id = 40;
B

SELECT first_name, last_name, salaryFROM employees ORDER BY last_name ASC WHERE


department_id = 40;
C

SELECT first_name last_name salary FROM employees WHERE department_id = 40 ORDER BY


last_name ASC;
D

SELECT first_name, last_name, salary FROM employees WHERE department_id = 40 ORDER BY


last_name;
E
SELECT first_name, last_name, salary FROM TABLE employees WHERE department_id IS 40
ORDER BY

Question 15 :Column alias names cannot be used in which clause?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT clause
B

WHERE clause
C

ORDER BY clause
D

None of these

What is wrong with the following statements submitted in SQL*Plus?

1. DEFINE V_DEPTNO = 20
2. SELECT LAST_NAME, SALARY
3. FROM EMPLOYEES
4. WHERE DEPARTMENT_ID = V_DeptNo;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Nothing is wrong. The query lists the employee name and salary of the
employees who belong to department 20.
B

The DEFINE statement declaration is wrong.


C

The substitution variable is not preceded with the & character.


D

The substitution variable in the WHERE clause should be V_DEPTNO instead


of V_DeptNo.

Which two statements regarding substitution variables are true?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

&variable is defined by SQL*Plus, and its value will be available for the
duration of the session.
B

&&variable is defined by SQL*Plus, and its value will be available for the
duration of the session.
C

&n (where n is any integer) variables are defined by SQL*Plus when values
are passed in as arguments to the script, and their values will be available for
the duration of the session.
D

&&variable is defined by SQL*Plus, and its value will be available only for every
reference to that variable in the current SQL.
Look at the data in table PRODUCTS. Which SQL statements will list the items on the BL shelves?
(Show the result with the most available quantity at the top row.)

Figure A
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT * FROM products


WHERE shelf like '%BL'
ORDER BY available_qty SORT DESC;
B

SELECT * FROM products


WHERE shelf like 'BL%';
C

SELECT * FROM products


WHERE shelf = 'BL%'
ORDER BY available_qty DESC;
D

SELECT * FROM products


WHERE shelf like 'BL%'
ORDER BY available_qty DESC;
E

SELECT * FROM products


WHERE shelf like 'BL%'
ORDER BY available_qty SORT;
The EMP table has the following data:

Figure: A

Consider the following two SQL statements:

1. SELECT empno, ename, sal, comm


FROM emp WHERE comm IN (0, NULL);
2. SELECT empno, ename, sal, comm
FROM emp WHERE comm = 0 OR comm IS NULL;
Which of the following is true?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

1 and 2 will produce the same result.


B

1 will error; 2 will work fine.


C

1 and 2 will produce different results.


D

1 and 2 will work but will not return any rows.


The EMP table has the following data:

Figure A

Which SQL code will retrieve the names of employees whose salary is at the fourth position
from top?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT ename, sal FROM emp ORDER BY 2 DESC OFFSET 3 ROWS FETCH NEXT 1 ROW WITH TIES;
B

SELECT ename, sal FROM emp ORDER BY 2 OFFSET 3 ROWS FETCH NEXT 1 ROW;
C

SELECT ename, sal FROM emp ORDER BY 2 DESC OFFSET 4 ROWS FETCH NEXT 1 ROW ONLY;
D

SELECT ename, sal FROM emp ORDER BY 2 FETCH FIRST 4 ROWS ONLY;
Question 1 :Which two functions could you use to strip leading characters from a character
string? (Choose two.)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

RTRIM
B

SUBSTR
C

LTRIM
D

STRIP
E

INSTR
Review the following table description:

SQL> desc user_page_counts


Name Null? Type
----------------------------------------- -------- --------
USER_ID NUMBER
ACTION_DATE DATE
PAGE_COUNT NUMBER

Which SQL insert statement will add the following data to the user_page_counts table:

Table Name: USER_PAGE_COUNTS


user_id Action_Date page_count
34 01/02/2017 50
Table: A
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

insert into user_page_counts values (34,sysdate, 50);


B

insert into user_page_counts values (34,to_date('01/02/2017','mm/dd/yyyy'), 50);


C

insert into user_page_counts


values (34, to_date('1/2/2017','mm/dd/yyyy')-sysdate, 50);
D
insert into user_page_counts
values (34,sysdate-to_date('01/02/2017','mm/dd/yyyy'), 50);
E

insert into user_page_counts (34, to_date('1/2/2017'), 50);


Review the following exhibit:

Exhibit

Which of the following answers would reformat the output so that it would look as follows:

TODAY_DATE
--------------------
MON 17 JUL 2017

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

select to_char(to_date('07/17/2017','mm/dd/yyyy'), 'DAY DD MON YYYY')


from dual;
B

select to_char(to_date('07/17/2017','mm/dd/yyyy'), 'DY DD MON YYYY') today_date


from dual;
C

None of the queries will produce the desired result.


D

Select to_date(sysdate, 'DAY DD MON YYYY') from dual;


E

select to_date('07/17/2017','DAY DD MON YYYY') from dual;


Question 4 :Which function will return a TIMESTAMP WITH TIME ZONE datatype?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

CURRENT_DATE
B

SYSDATE
C

CURRENT_TIMESTAMP
D

LOCALTIMESTAMP

Which of the following is a conditional expression that can be used in a select statement?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

compute
B

case expression
C

if-then expression
D

with clause
E

compute expression
Question 6 :Which of the following numeric functions returns the hyperbolic sine?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

NANVL
B

TANH
C

ATAN2
D

SINH

Which of the following numeric functions returns the next higher integer?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

FLOOR
B

CEIL
C

COSH
D

COS
Which of the following is NOT a conversion function?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

LOWER
B

TO_NUMBER
C

TO_CHAR
D

AVG

Which of the following will be the output of this expression:

SUBSTR('This is a test', 6, 2)

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

'test'
B

'This is a test'
C

'This is'
D

'is'
Which expression will always return the date one year later than the current date?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

CURRENT_DATE + 1
B

NEW_TIME(CURRENT_DATE,1,'YEAR')
C

None of these
D

SYSDATE + 365
E

SYSDATE + TO_YMINTERVAL('01-00')

What is the result of the following SQL statement?

select instr('STRINGS','STR') from dual;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

1,3
B

1
C

STR
D
0
E

This SQL statement will generate an error.

Question 13 :Which of the following functions is used to convert one data type into another?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Character
B

Number
C

Grouping
D

Conversion

At which of the following locations can single row functions be used?

Each correct answer represents a complete solution. Choose three.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

HAVING clauses
B

CONNECT BY clauses
C

START clauses
D

SELECT lists
E

GROUP BY clauses

What will the following SQL statement return?

SELECT COALESCE(NULL,'Oracle ','Certified') FROM dual;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Oracle
B

NULL
C

Oracle Certified
D

Certified
Which of the following functions returns a specific portion of a character string?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TRIM
B

LPAD
C

INSTR
D

SUBSTR

Which of the following conversion functions is used to convert a string to a timestamp data type?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TO_YMINTERVAL
B

UNISTR
C

TO_TIMESTAMP
D

TO_TIMESTAMP_TZ
Consider the following expression:

LENGTH('Tech on the Web')

What will be the output of this expression?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

4
B

15
C

4233
D

12

The data in the PRODUCT table is as described here. The bonus amount is calculated as the lesser
of 5 percent of the base price or 20 percent of the surcharge.

Which of the following statements will achieve the desired results?

Figure A: The List of Statements


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

None of these statements will achieve the desired results.


B

A, B, and C will all achieve the desired results.


C

SELECT sku, name, COALESCE(LEAST(base_price*0.05, surcharge * 0.2),


base_price * 0.05)FROM products;
D

SELECT sku, name, LEAST(NVL(base_price,0) * 0.05, surcharge *


0.2)FROM products;
E

SELECT sku, name, LEAST(base_price * 0.05, surcharge * 0.2)FROM


products;

Which of the following functions is used to return the largest integer value that is equal to or less
than a number?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SUBSTR
B

FLOOR
C

CEIL
D

NULLIF
Which of the following functions is used to convert a string from one character set to another?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TO_CHAR
B

CAST
C

CONVERT
D

TO_NUMBER

Consider the following table description:

SQL> desc teachers


Name Null? Type
----------------------------------------- -------- ------------
TEACHER_NUMBER NOT NULL NUMBER
TEACHER_LAST_NAME VARCHAR2(30)
TEACHER_FIRST_NAME VARCHAR2(30)
TEACHER_HIRE_DATE DATE

Also consider that the default database date format is:

'MM/DD/YYYY'

Assume that you need to insert the following new row:


Teacher_number 10
Teacher_last_name Jeffery
Teacher_first_nam Whipple
e
Teacher_hire_date 09/02/2017
Table: A
Which of the following SQL statements will successfully insert this new row?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Insert into teachers values (10,'Jeffery','Whipple',


to_date('09/02/2017','mm/dd/yyyy'));
B

Insert into teachers values (10,'Jeffery','Whipple',


to_char('09/02/2017','dd/mm/yyyy'));
C

Insert into teachers values (10,'Jeffery','Whipple', sysdate-


to_date('09/02/2017'));
D

Insert into teachers values (10,'Jeffery','Whipple', 09/02/2017);


E

Insert into teachers values (10,'Jeffery','Whipple', sysdate);

Question 23 :Which statement would change all occurrences of the string 'IBM' to the
string 'SUN' in the DESCRIPTION column of the VENDOR table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT TRANSLATE(description, 'IBM', 'SUN') FROM vendor


B

SELECT CONVERT(description, 'IBM', 'SUN') FROM vendor


C

SELECT EXTRACT(description, 'IBM', 'SUN') FROM vendor


D

SELECT REPLACE(description, 'IBM', 'SUN') FROM vendor

Which assertion about the following statements is most true?

1. SELECT name, region_code||phone_number


FROM customers;
2. SELECT name, CONCAT(region_code,phone_number)
FROM customers;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Both statements will return the same data.


B

The second statement will raise an error if REGION_CODE is NULL for any


customer.
C

If REGION_CODE is NULL, the first statement will not include that


customer's PHONE_NUMBER.
D

If REGION_CODE is NULL, the second statement will not include that


customer's PHONE_NUMBER.
Question 25 :Which of the following functions appends special characters to the right of the
string values but does not provide proper indentation?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SUBSTR
B

RPAD
C

LPAD
D

LTRIM
Which of the following is true about schema objects? (Choose all that apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Schema objects do not store data.


B

Schema object only store data.


C

Schema objects are owned by a database user.


D

Schema objects, unlike user objects, are not assigned names when they are
created.
E

Schema objects may, or may not, store data.

The STATE table has the following constraints (the constraint status is shown in parentheses):
pk_state (enabled)
Primary key

Foreign key COUNTRY table: fk_state (enabled)


Check constraint ck_cnt_code (disabled)
Check constraint ck_st_code (enabled)
NOT NULL constraint nn_st_name (enabled)
Table A: The STATE Table Constraints

You execute the following SQL code:

CREATE TABLE STATE_NEW AS SELECT * FROM STATE;

How many constraints will there be in the new table?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

2
B

5
C

3
D

1
E

Which line of code has an error?

1. 1. CREATE TABLE FRUITS_VEGETABLES


2. 2. (FRUIT_TYPE VARCHAR2,
3. 3. FRUIT_NAME CHAR (20),
4. 4. QUANTITY NUMBER);

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

1
B

4
C
3
D

Question 4 :Which of the following database objects is useful for generating unique serial
numbers or key values?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Synonym
B

Index
C

View
D

Sequence

Which of the following statements will create a primary key for the CITY table with the
columns STATE_CD and CITY_CD? (Choose all that apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

CREATE CONSTRAINT PK_CITY PRIMARY KEY ON CITY (STATE_CD,


CITY_CD);
B
ALTER TABLE CITY ADD CONSTRAINT PK_CITY PRIMARY KEY
(STATE_CD, CITY_CD);
C

ALTER TABLE CITY ADD PRIMARY KEY (STATE_CD, CITY_CD);


D

ALTER TABLE CITY ADD PRIMARY KEY CONSTRAINT PK_CITY ON


(STATE_CD, CITY_CD);
E

CREATE PRIMARY KEY ON CITY (STATE_CD, CITY_CD);

Which of the following data types is used to store a period of time in terms of days, hours,
minutes, and seconds and is used to represent the precise difference between two date time
values?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

LONG
B

INTERVAL DAY TO SECOND


C

INTERVAL YEAR TO MONTH


D

NUMBER
Which actions are allowed on a table that is marked as read-only? (Choose all that apply.)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Dropping a constraint
B

Dropping an index
C

Dropping a table
D

Truncating a table
E

Inserting new data

Examine the structure of the CARS table below


Column
Column Name Additional Constraint Information
Datatype
Car_number Number Primary key, not null
Vin Varchar2(30) Not null, unique
Model_number Number Not null, foreign key to model_number in model
table
Package_number Number Not null, foreign key to package_number in
dealer table
Dealer_assignment_numbe Number Not null, foreign key to dealer_number in dealer
r table
Date_built Date Not null
Factory_number Number foreign key to factory_number in factory table
Status Varchar2(1) foreign key to status_code in status table, Not null
Table: A
Which of the following statements is true about this table? (Choose all that apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

The Vin column must contain a unique value for each row of the cars table.
B

The status column in each row of the table can contain a null value.
C

The value in the car_number column for a given row must be unique
compared to all of the other rows in the table.
D

The date_built column in the cars table can contain null values.
E

The factory_number column must contain a value in each row of the cars
table.

Question 9 :Which of the following is a non-schema object?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Constraint
B

Context
C

View
D
Operator

Question 10 :Which object would you create if you wanted to store data in the database?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

View
B

Synonym
C

Sequence
D

Table
E

Transaction

Which of the following is NOT a LOB data type?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

CLOB
B

BFILE
C

NLOB
D
BLOB

What special characters are allowed in a table name? (Choose all that apply.)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

$
B

&
C

#
D

The HIRING table has the following data:

EMPNO HIREDATE
--------- ----------
1021 12-DEC-00
3400 24-JAN-01
2398 30-JUN-01

What will be result of the following query?

SELECT hiredate+1 FROM hiring WHERE empno = 3400;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
N-02
B

25-JAN-01
C

4-FEB-01
D

None of these

Which of the following modifications to a table's structure are possible by using the ALTER
TABLE statement?

Each correct answer represents a complete solution. Choose all that apply.
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Adding or dropping indexes


B

Dropping a column with a timestamp data type


C

Adding or dropping columns


D

Altering a column in a PRIMARY KEY or [FOREIGN KEY] REFERENCES


constraint
E

Changing the nullability constraint for a column


F
Renaming the table

Which of the alter table commands adds a column that will store variable character data type that
is up to 500 bytes in length?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

varchar2(500 char)
B

varchar2(500)
C

varchar2
D

char(500 bytes)
E

varchar2(500 bytes)

Which of the following will allow you to specify the database you wish to work with within your
DBMS?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT INTO
B
ALTER
C

CREATE
D

USE

Which of the following is a logical table that is based on one or more tables but does not contain
any data in itself?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Sequence
B

View
C

Index
D

Constraint

Which of the following are non-schema objects?

Each correct answer represents a complete solution. Choose three.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Editions
B
Restore points
C

Views
D

Directories

You have a large job that will load many thousands of rows into your ORDERS table. To speed up
the loading process, you want to temporarily stop enforcing the foreign key
constraint FK_ORDERS. Which of the following statements will satisfy your requirement?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

ALTER TABLE ORDERS DISABLE ALL CONSTRAINTS;


B

ALTER CONSTRAINT FK_ORDERS DISABLE;


C

ALTER TABLE ORDERS DISABLE FOREIGN KEY FK_ORDERS;


D

ALTER TABLE ORDERS DISABLE CONSTRAINT FK_ORDERS;

Which of the following commands are classified as Data Definition Language (DDL)
commands?

Each correct answer represents a complete solution. Choose three.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.
A

CREATE
B

INSERT
C

DROP
D

ALTER

Question 21 :Which of the following is a valid create table command?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Create table my_table(table_number number);


B

Create table my_table(table_number number table_value varchar2(30));


C

Crate table table_number number;


D

Create table table(table_id number);


E

create table my_table(number);

Which of the following are not schema objects?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.
A

Synonyms
B

Grants
C

View
D

Tables
E

Indexes

Question 23 :Which of the following constraints enforces domain integrity by limiting the
values that are accepted by a column?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

CHECK
B

UNIQUE
C

FOREIGN KEY
D

PRIMARY KEY
Consider the following table named Customer.

Figure A: CUSTOMER Table

You want to keep records of phone numbers of customers. For this, you have to add a column
named PhoneNo in the Customer table. Which of the following commands will allow you to
accomplish the task?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

REVOKE
B

DENY
C

ALTER
D

UPDATE

Question 25 :Which of the following is not an Oracle schema object type?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.
A

Views
B

Transactions
C

Tables
D

Sequences
E

Synonyms

Examine the structure of the CARS table below:


Column
Column Name Additional Constraint Information
Datatype
Car_number Number Primary key, not null
Vin Varchar2(30) Not null
Model_number Number Not null, foreign key to model_number in model
table
Package_number Number Not null, foreign key to package_number in
dealer table
Dealer_assignment_numbe Number Not null, foreign key to dealer_number in dealer
r table
Date_built Date Not null
Factory_number Number foreign key to factory_number in factory table
Status Varchar2(1) foreign key to status_code in status table
Which of the following statements about this table are false? Select all that apply.
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

The status column in each row of the table does not need to be unique.
B

The Vin column must contain a unique value for each row of the cars table.
C

The factory_number column must contain a value in each row of the cars
table.
D

The date_built column in the cars table cannot contain null values.
E

The value in the car_number column for a given row must be unique
compared to all of the other rows in the table.

You need to duplicate the structure and data of the EMP table in the EMPLOYEES table. Which
of the following statements will allow you to accomplish this task?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

CREATE TABLE EMPLOYEES


AS SELECT * FROM EMP;
B

CREATE TABLE EMPLOYEES


INTO SELECT * FROM EMP;
C
SELECT * INTO
EMPLOYEESDB FROM EMP;
D

INSERT INTO EMPLOYEES


SELECT * FROM EMP;

Which of the following is a method of storing data from related tables at a common physical
location?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

PL/SQL program
B

Database link
C

Materialized view
D

Cluster

Question 29 :A constraint is created with the DEFERRABLE INITIALLY IMMEDIATE clause. What


does this mean?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Constraint checking is done after each SQL statement is executed, but you
can change this behavior by specifying SET CONSTRAINTS ALL DEFERRED.
B
Existing rows in the table are immediately checked for constraint violation.
C

The constraint is immediately checked in a DML operation, but subsequent


constraint verification is done at commit time.
D

Constraint checking is done only at commit time.

The STATE table has six rows. You issue the following command:

1. ALTER TABLE STATE ADD UPDATE_DT DATE DEFAULT SYSDATE;

Which of the following is correct?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Because the table is not empty, you cannot add a new column.
B

A new column, UPDATE_DT, is added to the STATE, table, and its contents for the
existing rows are NULL.
C

A new column, UPDATE_DT, is added to STATE, and its default value is saved in


the dictionary.
D

The DEFAULT value cannot be provided if the table has rows.


Which of the following data types shows the time-zone information along with the date value?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TIMESTAMP WITH TIME ZONE


B

DATE
C

TIMESTAMP
D

TIMESTAMP WITH LOCAL TIME ZONE

Which dictionary view would you query to list only the tables you own?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

ALL_TABLES
B

USR_TABLES
C

USER_TABLES
D

DBA_TABLES
Which of the following cannot be contained in a create table command?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
NOT NULL constraint
B

Explicit index creation


C

Column name
D

Primary key definition


E

Unique key definition

Which of the following types of schema objects can be created and manipulated with SQL?

Each correct answer represents a complete solution. Choose all that apply.
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Database links
B

Database triggers
C

Tablespaces
D

Synonyms

Which statement will remove the column UPDATE_DT from the table STATE?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.
A

ALTER TABLE STATE SET UNUSED COLUMN UPDATE_DT;


B

DROP COLUMN UPDATE_DT FROM STATE;


C

ALTER TABLE STATE REMOVE COLUMN UPDATE_DT;


D

ALTER TABLE STATE DROP COLUMN UPDATE_DT;


E

You cannot drop a column from the table.

Which of the following schema objects share one namespace?

Each correct answer represents a complete solution. Choose three.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Database triggers
B

Private synonyms
C

Materialized views
D

Packages
Question 37 :Which type of constraint cannot be created as an inline constraint when creating a
table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Check
B

NOT NULL
C

None of these
D

Unique
E

Primary key

Examine the structure of the SALES table below:


Column Column
Additional Constraint Information
Name Datatype
Sales_id Number Primary key, not null
Store_number Number Not null
Item_number Number Not null
Quantity Number Not null
Table: A
Which of the following statements would you use to create the SALES table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

create table SALES (


Sales_id number primary key
Store_number number not null
Item_number number not null
Quantity number);
B

create table SALES (


Sales_id number primary key,
Store_number number not null,
Item_number number not null,
Quantity number not null);
C

create table SALES (


Sales_id number unique,
Store_number number,
Item_number number not null,
Quantity number not null);
D

create table SALES (


Sales_id number primary key,
Store_number number no null,
Item_number number no null,
Quantity number no null);
E

create table SALES (


Sales_id number primary key,
Store_number number,
Item_number number not null,
Quantity number not null);

Which of the following schemas have their own namespaces?

Each correct answer represents a complete solution. Choose three.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Dimensions
B
User-defined types
C

Clusters
D

Indexes

You need to create a table named Customers that meets all these requirements:

 Create five columns in this sequence: CustomerID, LastName, FirstName, Address,


and City.
 The data type of each column should be varchar.
 The length of all fields should be 150 characters except CustomerID, which should
be 20 characters.
 The value of the CustomerID column must be unique and not null.

Which of the following SQL statements would allow you to meet these requirements.

Each correct answer represents a complete solution. Choose two.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Create table Customers


(
CustomerID varchar(20),
LastName varchar(150),
FirstName varchar(150),
Address varchar(150),
City varchar(150),
CONSTRAINT cust_id_nn NOT NULL (CustomerID)
);
B

Create table Customers


(
CustomerID varchar(20),
LastName varchar(150),
FirstName varchar(150),
Address varchar(150),
City varchar(150),
CONSTRAINT cust_id_uk UNIQUE (CustomerID),
CONSTRAINT cust_id_nn NOT NULL (CustomerID)
);
C

Create table Customers


(
CustomerID varchar(20) CONSTRAINT cust_id_nn NOT NULL,
LastName varchar(150),
FirstName varchar(150),
Address varchar(150),
City varchar(150)
);
D

Create table Customers


(
CustomerID varchar(20) CONSTRAINT cust_id_nn NOT NULL,
LastName varchar(150),
FirstName varchar(150),
Address varchar(150),
City varchar(150),
CONSTRAINT cust_id_uk UNIQUE (CustomerID)
);

Question 1 :Examine the structure of the CARS table below:


Column
Column Name Additional Constraint Information
Datatype
Car_number Number Primary key, not null
Vin Varchar2(30) Not null
Model_number Number Not null, foreign key to model_number in model
table
Package_number Number Not null, foreign key to package_number in
dealer table
Dealer_assignment_numbe Number Not null, foreign key to dealer_number in dealer
r table
Date_built Date Not null
Factory_number Number foreign key to factory_number in factory table
Status Varchar2(1) foreign key to status_code in status table

Which of the following statements about this table are false? Select all that apply.
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

The date_built column in the cars table cannot contain null values.
B

The factory_number column must contain a value in each row of the cars
table.
C

The Vin column must contain a unique value for each row of the cars table.
D

The status column in each row of the table does not need to be unique.
E

The value in the car_number column for a given row must be unique
compared to all of the other rows in the table.

Review the following exhibits:

Exhibit

Which of the following parts of a SQL statements will correctly sort the output of the query by
the name of the department the employee is assigned too?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
select *
from employees a, depts b
where a.dept_dept_num=b.dept_num
order by b.dept_desc;
B

select *
from employees a, depts b
where a.dept_dept_num=b.dept_num
order by b.dept_no;
C

select *
from employees a, depts b
where a.dept_dept_num=b.dept_num
order by a;
D

select *
from employees a, depts b
where a.dept_dept_num=b.dept_num
order by a.dept_dept_num;
E

select *
from employees a, depts b
where a.dept_dept_num=b.dept_num
order by 1;

Which of the following functions will change the case of the string but not provide the
functionality of case-insensitivity?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SUBSTR
B

INITCAP
C

INSTR
D
TRANSLATE

Which of the following conversion functions is used to convert raw to an NVARCHAR2


character value containing its hexadecimal equivalent?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

RAWTONHEX
B

RAWTOHEX
C

REFTOHEX
D

HEXTORAW

Which of the following INSERT statements will raise an exception?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

INSERT FIRST WHEN DEPT_NO IN (12,14) THEN INTO EMP SELECT *


FROM NEW_EMP;
B

INSERT FIRST WHEN DEPT_NO IN (12,14) THEN INSERT INTO EMP


SELECT * FROM NEW_EMP;
C

INSERT INTO EMP SELECT * FROM NEW_EMP;


D

INSERT ALL WHEN DEPT_NO IN (12,14) THEN INTO EMP SELECT *


FROM NEW_EMP;

Which of the following statements are true for the ORDER BY clause?

Each correct answer represents a complete solution. Choose two.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

By default, the ORDER BY clause sorts rows in descending order.


B

The ORDER BY clause is used with the SELECT statement.


C

The ORDER BY clause sorts the result set based on the columns specified.

Review the following code snippet. Which line has an error?

1. UPDATE EMPLOYEES
2. WHERE EMPLOYEE_ID = 127
3. SET SALARY = SALARY * 1.25,
4. COMMISSION_PCT = 0

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

4
B

There is no error
C

1
D

Review the following exhibit:

Exhibit

Which of the following SQL statements will produce a report for all users who had over 100
page_counts between 12/01/2016 and 12/04/2016 as seen in this example output:

USER_ID PAGE_COUNTS
---------- -----------
2 136
4 156
3 230

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

select user_id, sum(page_count) page_counts


from user_page_counts
group by user_id
having sum(page_count) > 100;
B

select user_id, sum(page_count) page_counts


from user_page_counts
where action_date>=to_date('12/01/2017','mm/dd/yyyy')
and action_date<=to_date('12/04/2017','mm/dd/yyyy')
group by user_id
having sum(page_count) > 100;
C
select user_id, sum(page_count) page_counts
from user_page_counts
where action_date>=to_date('12/01/2016','mm/dd/yyyy')
and action_date<=to_date('12/04/2016','mm/dd/yyyy')
having sum(page_count) > 100;
D

select user_id, sum(page_count) page_counts


from user_page_counts
where action_date>=to_date('12/01/2016','mm/dd/yyyy')
and action_date<=to_date('12/04/2016','mm/dd/yyyy')
group by user_id
having sum(page_count) > 100;

Which of the following functions is used to round a number 'n' up to the next whole number?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TRUNC
B

CEIL
C

FLOOR
D

MOD

Review the following data from the USER_PAGE_COUNTS table:


user_id Action_Date page_count
1 12/01/2016 5
2 12/01/2016 50
3 12/01/2016 100
4 12/01/2016 70
1 12/02/2016 12
2 12/02/2016 34
3 12/02/2016 65
2 12/03/2016 26
4 12/03/2016 43
3 12/04/2016 65
2 12/04/2016 26
4 12/04/2016 43
1 12/05/2016 175
Table: A
Which SQL statement will provide the total page counts for each user in the user_page_counts
table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

select user_id, summ(page_count) page_count


from user_page_counts
group by user_id;
B

select user_id, count(page_count) page_count


from user_page_counts
group by user_id;
C

select user_id, avg(page_count) page_count


from user_page_counts
group by user_id;
D

select user_id, avg(page_count) page_count


from user_page_counts
group by user_id
having avg(*);
E
select user_id, sum(page_count) page_count
from user_page_counts
group by user_id;

Which clauses in the SELECT statement can use single-row functions nested in aggregate


functions? (Choose all that apply.)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
ORDER BY
B
WHERE
C
GROUP BY
D
SELECT

Which of the following is the default value of the ORDER BY clause to sort the result set?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TOP
B

BOTTOM
C

ASC
D
DESC

Which of the following is a small bit of logic, defined by a user, to instruct a particular table
about how it will accept, modify, or reject incoming data?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

View
B

Role
C

Constraint
D

Table

Question 16 :Which of the following functions can be used to extract the last three characters
from a given string?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TRIM
B

SUBSTR
C

INSTR
D

LPAD

Question 17 :Which of the following capabilities refers to the restriction of tuples or rows from
a table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Sorting
B

Joining
C

Selection
D

Projection

Consider the following code segment. How many rows will be in the CARS table after all these
statements are executed?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

28
B

32
C

30
D

29

Which of the following types of operator does an INNER JOIN use in the WHERE clause to
define the join criteria?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
*
B

+
C

=
D

Which of the following subqueries returns exactly one column value from one row?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Correlated subquery
B

Single-row subquery
C

Multiple-column subqueries
D

Scalar subquery

The EMP table has the following data:


Figure A

What will happen if you query the EMP table with the following?

1. SELECT empno, DISTINCT ename, salary


2. FROM emp;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

EMPNO and unique values of the two columns, ENAME and SALARY, are displayed.


B

EMPNO, unique values of ENAME, and then SALARY are displayed.


C

No values will be displayed because the statement will return an error.


D

DISTINCT is not a valid keyword in SQL.


Question 22 :Which of the following clauses specifies a search condition to restrict the rows
returned?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

LIKE
B

BETWEEN
C

WHERE
D

DROP

Question 23 :Examine the data in the SALES table below:


Sale_numbe item_numbe
store_number sales_date employee_number quantity_sold
r r
1 1 01/02/201 1234 102 1
7
1 1 01/02/201 1234 115 2
7
2 1 01/02/201 1500 122 1
7
2 1 01/02/201 1500 101 3
7
3 2 01/02/201 176 22 2
7
4 2 01/03/201 199 43 4
7
5 1 01/03/201 1234 108 6
7
5 1 01/03/201 1234 102 2
7
6 4 01/03/201 1500 300 1
7

Evaluate the following SELECT statement:

select store_number, sales_date, item_number, sum(quantity_sold) qty_sold


from sales
where trunc(sales_date)=to_date('01/01/2017', 'mm/dd/yyyy')
group by store_number, sales_date, item_number
order by 1,2,3;

Which of the following statements is true?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Store number 1 and item number 101 will appear first in the output.
B

Item number 101 will appear first in the output.


C

Store number 1 will appear first in the output.


D

Store number 4 will appear on the output.


E

No rows will be returned by the query.

Which SQL statements do not give an error? (Choose all that apply.)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.
A

SELECT last_name, e.hire_date, department_id


FROM employees e JOIN
(SELECT department_id, max(hire_date) hire_date
FROM employees GROUP BY department_id) me
USING (hire_date)

SELECT last_name, e.hire_date, department_id


FROM employees e
WHERE (department_id, hire_date) IN
(SELECT department_id, max(hire_date) hire_date
FROM employees GROUP BY department_id)

SELECT last_name, e.hire_date, department_id


FROM employees e
WHERE hire_date =
(SELECT max(hire_date) max_hire_date
FROM employees ORDER BY 1)

SELECT last_name, e.hire_date, department_id


FROM employees e
JOIN (SELECT max(hire_date) max_hire_date
FROM employees ORDER BY 1) me
ON (e.hire_date = me.max_hire_date)

Examine the structure of the CARS table below


Column
Column Name Additional Constraint Information
Datatype
Car_number Number Primary key, not null
Vin Varchar2(30) Not null, unique
Model_number Number Not null, foreign key to model_number in model
table
Package_number Number Not null, foreign key to package_number in
dealer table
Dealer_assignment_numbe Number Not null, foreign key to dealer_number in dealer
r table
Date_built Date Not null
Factory_number Number foreign key to factory_number in factory table
Status Varchar2(1) foreign key to status_code in status table, Not null
Table: A
Which of the following statements is true about this table? (Choose all that apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

The value in the car_number column for a given row must be unique
compared to all of the other rows in the table.
B

The date_built column in the cars table can contain null values.
C

The factory_number column must contain a value in each row of the cars
table.
D

The Vin column must contain a unique value for each row of the cars table.
E

The status column in each row of the table can contain a null value.

Review the following table description:

SQL> desc user_page_counts


Name Null? Type
----------------------------
USER_ID NUMBER
ACTION_DATE DATE
PAGE_COUNT NUMBER
Which SQL insert statement will add the following data to the user_page_counts table?

Table Name: USER_PAGE_COUNTS


user_id Action_Date page_count
1 12/25/2017 22
Table: A
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

insert into user_page_counts (1, to_date('12/25/2017'), 22);


B

insert into user_page_counts


values (1,sysdate-to_date('12/25/2017','mm/dd/yyyy'), 22);
C

insert into user_page_counts


values (1, to_date('12/25/2017','mm/dd/yyyy')-sysdate, 22);
D

insert into user_page_counts values (1,to_date('12/25/2017','mm/dd/yyyy'), 22);


E

insert into user_page_counts values (1,sysdate, 22);

Which of the following types of operators returns all rows selected by either query, including all
duplicates?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

UNION
B

MINUS
C
INTERSECT
D

UNION ALL

Which of the following parts of a SQL statement will cause the rowset of a query to be properly
ordered?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

group by
B

where
C

distinct
D

None of these will properly order the resulting row sets from a query.
E

sum

Which of the following functions is NOT a GROUP function?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

LENGTHS
B

MIN
C

AVG
D

MAX

Why does the following SELECT statement fail?

Figure: A
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

The GROUP BY clause must contain the group functions used in the SELECT list.


B

The HAVING clause can contain only the group functions used in the SELECT list.


C

GROUP BY clause cannot contain a column alias.


D

The condition COUNT(*) > 20 should be in the WHERE clause.

Which of the following queries will display the term_date in the following format:

EMP_NUM TO_CHAR(TERM_DATE,'MM/DD/YYYYHH24:MI:SS-DAY')
---------------------------------------------------------
1 01/25/2016 00:00:00 - MONDAY
2 05/31/2017 22:00:34 - WEDNESDAY
3 04/01/2017 22:00:42 - SATURDAY
4 01/11/2017 22:00:50 - WEDNESDAY
5 10/03/2016 22:00:56 - MONDAY

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

select emp_num, to_char(term_date, 'mm/dd/yyyy hh24:mi:ss - DAY') from


employees;
B

The query will return an error since there is no provision in the date/time
format masks to display the day of the week.
C

select emp_num, to_char(term_date, 'mm/dd/yyyy hh24:mi:ss - D') from


employees;
D

select emp_num, to_char(term_date, 'mm/dd/yyyy hh24:mi:ss') from


employees;
E

select emp_num, to_char(term_date, 'mm/dd/yyyy hh24:mi:ss'/DAY) from


employees;

What is the result of the following SQL statement?

select trunc(123.3354,2) from dual;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

123
B
1234
C

This SQL statement will generate an error.


D

123.33
E

123.34

What special characters are allowed in a table name? (Choose all that apply.)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

@
B

#
C

&
D

Examine the data in the CLASS table below:


teacher_numbe
Class student_count
r
1 1 20
2 2 20
3 3 30
4 4 15
5 1 30
6 2 35
7 3 22
8 4 14
9 1 30
10 1 22
11 2 30
Table: A
And the data in the teachers table below:
Teacher_number teacher_last_name teacher_first_name
1 Smith Carrol
2 Sargon Lee
3 Franks Michael
4 Mulder Francis
Table: B
What will be the result of the following SQL statement?

Select b.teacher_last_name, b.teacher_first_name


From class a, teachers b
Where a.teacher_number=b.teacher_number
And a.student_count=(select max(student_count) from class);

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TEACHER_LAST_NAME TEACHER_FIRST_NAME
-----------------------------------------
Smith Carrol
B

The SQL will return an error because there is no group by function associated
with the max(student_count) clause.
C
The SQL will return an error because the subquery against the class table,
which should only return one value, will return more than one value.
D

The SQL has a syntax mistake will return an error.


E

TEACHER_LAST_NAME TEACHER_FIRST_NAME
-----------------------------------------
Sargon Lee

Question 35 :Which dictionary view would you query to list only the tables you own?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

USR_TABLES
B

USER_TABLES
C

DBA_TABLES
D

ALL_TABLES

Examine the structure of the SALES table below:


Column Column
Additional Constraint Information
Name Datatype
Sales_id Number Primary key, not null
Store_number Number Not null
Item_number Number Not null
Quantity Number Not null
Table: A
Which of the following statements would you use to create the SALES table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

create table SALES (


Sales_id number primary key,
Store_number number not null,
Item_number number not null,
Quantity number not null);
B

create table SALES (


Sales_id number primary key
Store_number number not null
Item_number number not null
Quantity number);
C

create table SALES (


Sales_id number primary key,
Store_number number,
Item_number number not null,
Quantity number not null);
D

create table SALES (


Sales_id number primary key,
Store_number number no null,
Item_number number no null,
Quantity number no null);
E

create table SALES (


Sales_id number unique,
Store_number number,
Item_number number not null,
Quantity number not null);
Which of the following SQL statements selects all rows from a table named Sales and orders the
result set by the City column?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT City FROM Sales WHERE City > 1000;


B

SELECT * FROM Sales ORDER BY City;


C

SELECT * FROM Sales GROUP BY City;


D

SELECT City FROM Sales;

Which of the following will be the output of this expression:

SELECT FROM_TZ(TIMESTAMP '2000-03-28 08:00:00', '3:00')


FROM DUAL;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

28-MAR-00 08.00.00 AM +03:00


B

29-MAR-00 08.00.00 PM +03:00


C

26-MAR-00 08.00.00 PM +03:00


D

26-MAR-00 08.00.00 AM +03:00


You maintain a table named Sales:

Figure: A

You want to know how many salespersons have sold Product Number 21765. Which of the
following queries will allow you to accomplish this task?

Each correct answer represents a complete solution. Choose two.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT COUNT(DISTINCT PRODNUM) FROM SALES WHERE PRODNUM=21765;


B

SELECT COUNT(PRODNUM) FROM SALES WHERE PRODNUM=21765;


C

SELECT PRODNUM FROM SALES WHERE PRODNUM=21765;


D

SELECT COUNT(*) FROM SALES WHERE PRODNUM=21765;


Which of the following statements correctly describes the GROUPING function?

Each correct answer represents a complete solution. Choose three.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

It is used to form various groups to calculate totals and subtotals created


using the ROLLUP and CUBE operators.
B

It operates on one or more groups of rows and gives one result per group.
C

It returns a single result based on a number of rows as opposed to the single


row functions.
D

It is used to identify if the NULL value in an expression is a stored NULL value


or created by ROLLUP or CUBE.

The EMPLOYEE table has the following data:


Figure A

What will be the value in the first row of the result set when the following query is executed?

1. SELECT hire_date FROM employee ORDER BY salary, emp_name;

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

A
28-SEP-91
B
17-DEC-90
C
02-APR-91
D

The query is invalid, because you cannot have a column in the ORDER BY clause
that is not part of the SELECT claus

Which of the following is a transaction control statement that ends the current database
transaction and makes all changes made in that transaction permanent?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SAVEPOINT
B

SET TRANSACTION
C

ROLLBACK
D

COMMIT
Which of the following is the correct syntax of the TRUNCATE command?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

TRUNCATE TABLE <table_name> WHERE <condition>;


B

TRUNCATE <table_name> WHERE <condition>;


C

TRUNCATE <table_name>;
D

TRUNCATE TABLE <table_name>;

Which of the following update statements will result in an error?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

update employees set term_date=sysdate where emp_num in (select


emp_num from new_term_date_table);
B

update employees set term_date=(select max(term_date) from


new_term_date_table);
C

update employees set term_date = NULL where emp_num=1;


D

update employees set emp_last_name='Adams' where emp_num=2;


E

update employees set date=sysdate;

Which of the following types of joins retrieves all values in a certain table regardless of whether
these values are present in other tables?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

RIGHT JOIN
B

OUTER JOIN
C

INNER JOIN
D

LEFT JOIN

Which of the following commands are classified as Data Manipulation Language commands?

Each correct answer represents a complete solution. Choose three.


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

INSERT
B

DROP
C

DELETE
D
UPDATE

Which of the following is true about a truncate statement? (Choose all that are correct)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

To complete a truncate statement you must issue a commit.


B

You can reverse the effects of a truncate statement by issuing a rollback


statement.
C

A truncate statement is considered a DDL statement.


D

A truncate statement cannot be used on a table with an index.


E

A truncate statement includes an implicit commit.

Review the structure/data contained in a table called locations:


Location_i
Location_description Location_add_date
d
1 Enid 1/25/2016
2 Ponca City 6/12/2016
3 Henderson 10/30/2016
4 SLC 3/22/2017
Table: A
And the inspections table:
Inspection_id Location_id Inspection_date
1 1 1/25/2016
2 2 6/12/2016
3 3 10/30/2016
4 1 1/25/2017
Table: B
Which SQL statement will join the locations and inspections tables together into a single report
showing all the columns of each table as seen in this example?

LOCATION_DESCRIPTION LOCATION_ INSPECTIO


------------------------------------------------
Enid 25-JAN-16 25-JAN-16
Ponca City 12-JUN-16 12-JUN-16
Henderson 30-OCT-16 30-OCT-16
Enid 25-JAN-16 25-JAN-17

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

select a.location_description, a.location_add_date,


b.inspection_date
from locations a, inspections b
where a.location_id=b.location_id;
B

select a.location_description, a.location_add_date,


b.inspection_date
from locations, inspections
where a.location_id=b.location_id;
C

select a.location_description, a.location_add_date,


b.inspection_date
from locations a, inspections b;
D

select a.location_description, a.location_add_date,


b.inspection_date
from locations a
where a.location_id=b.location_id;
E
select a.location_description, a.location_add_date,
b.inspection_date
from locations a, inspections b
where a.location_id=a.location_id;

You issue the following query:

1. SELECT salary "Employee Salary"


2. FROM employees;

How will the column heading appear in the result?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

EMPLOYEE_SALARY
B

Employee Salary
C

employee_salary
D

EMPLOYEE SALARY

Consider the following statement:

CREATE TABLE MY_TABLE (


1ST_COLUMN NUMBER,
2ND_COLUMN VARCHAR2 (20));

Which of the following best describes this statement?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.
A

The reserved word COLUMN cannot be part of the column name.


B

Tables cannot be created without defining a primary key. The primary key is
missing form the table definition.
C

There is no error in the statement.


D

No maximum length is specified for the first column definition. You must
always specify a length for character and numeric columns.
E

The column names are invalid.

Which of the following is a schema object?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

User
B

Directory
C

Context
D

Constraint
Examine the data in the CLASS table below:
teacher_numbe
Class student_count
r
1 1 20
2 2 20
3 3 30
4 4 15
5 1 30
6 2 35
7 3 22
8 4 14
9 1 31
10 1 22
11 2 30
Table: A
Which of the following delete statements will remove all of the classes that have teacher 2 as the
teacher and where there are less than 30 students in the class?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Delete from class where teacher_number=1 and student_count>30


B

Delete from class where teacher_number=2 and student_count<30;


C

delete from class where teacher_number in =2 and student_count<=30;


D

delete from class where student_count<30;


E

Delete from class where (teacher_number, student_count) in (1,>30);


Which of the following statements can you use to insert rows into the Artists table?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

INSERT artists (genre, artist_name)


B

INSERT INTO artists (artist_name, genre) VALUES('Kenny Rogers', 'ctry');


C

INSERT artists VALUES('Britney Spears','pop');


D

INSERT artists (genre, artist_name) VALUES('rock', 'AC/DC');

Question 56 :Review the following data from the teachers table:


teacher_last_nam
Teacher_number teacher_first_name Teacher_hire_date
e
1 FRANKS MICHAEL 08/01/2017
2 MULDER FRANCIS 08/02/2017
3 SARGON LEE 08/03/2017
4 GRANT ARNOLD 08/15/2017
5 SMITH CARROL 08/31/2017
Table: AReview the following query:

Select *
From teachers
Order by 4 desc, 2, 3 asc;

Which of the following statements is true?


This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.
A

The first row will be teacher_number 2.


B

The query above will generate an error.


C

Column 2 will be sorted in descending order.


D

Column 2 will be sorted in ascending order.


E

The first row will be teacher_number 1.

Question 57 :Which statement best describes the use of a group function? (Choose all that
apply)
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

Group functions return a single result row based on groups of rows.


B

Group functions require the use of a function.


C

A group function can include an ordering clause.


D

Group functions must include a group by clause.


E

None of these answers are correct.


Which statement successfully adds a new column, ORDER_DATE, to the table ORDERS?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

ALTER TABLE ORDERS ADD COLUMN ORDER_DATE DATE;


B

ALTER TABLE ORDERS NEW COLUMN ORDER_DATE TYPE DATE;


C

ALTER TABLE ORDERS ADD ORDER_DATE DATE;


D

ALTER TABLE ORDERS ADD ORDER_DATE (DATE);

The columns of the EMPLOYEES and DEPARTMENTS tables are shown in question 8. Which query


will show you the top five highest-paid employees in the company?
This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

SELECT * FROM(SELECT last_name, salary FROM employees ORDER BY


salary)WHERE ROWNUM <= 5;
B

SELECT * FROM(SELECT last_name, salary FROM employees ORDER BY


salary DESC)WHERE ROWNUM <= 5;
C

SELECT last_name, salary FROM employees WHERE ROWNUM <= 5


ORDER BY salary DESC;
D
SELECT last_name, salary FROM (SELECT *FROM employees WHERE
ROWNUM <= 5; ORDER BY salary DESC )WHERE ROWNUM <= 5;

The CUSTOMERS and ORDERS tables have the following data:

When the following query is executed, what will be the value of PROD_ID and ORD_DATE for the
customer Abraham Taylor, Jr.?

SELECT c.cust_id, c.cust_name, o.ord_date, o.prod_id


FROM customers c, orders o
WHERE c.cust_id = o.cust_id (+);

This task contains the radio buttons and checkboxes for options. The shortcut keys to perform
this task are A to H and alt+1 to alt+9.

NULL, NULL
B

1001, 02-FEB-00
C

The query will not return customer Abraham Taylor, Jr.


D

NULL, 01-JAN-01
t

You might also like