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

June 2020

Uploaded by

ewanev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

June 2020

Uploaded by

ewanev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 96

Name: _________________________

Score: ______ / ______

myTest

Part 1:

1
You need to create a table for a banking application. One of the columns in the
table has the following requirements:

• You want a column in the table to store the duration of the credit period.
• The data in the column should be stored in a format such that it can be easily
added and subtracted with date data type without using conversion functions
• The maximum period of the credit provision in the application is 30 days
• The interest has to be calculated for the number of days an individual has taken
a credit for.
Which data type would you use for such a column in the table?

A.
Date Feedback: --------

B.
Timestamp Feedback: --------

C.
Interval Year to Month Feedback: --------

D.
Interval day to second Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

Open Rubric
2
Which 3 SQL statements would display the value 1890.55 as $1, 890.55?

1.Select to_char(1890.55,’$0G000D00’ from dual;


2.Select to_char(1890.55, ‘$9,999V99’) from dual;
3.Select to_char(1890.55, ‘$99,999D99’) from dual;
4.Select to_char(1890.55, ‘$99G999V99’) from dual;
5.Select to_char(1890.55, ‘$9,999V99’) from dual;

A.
1, 2, 4 Feedback: --------

B.
1, 3, 5 Feedback: --------

C.
1, 4, 5 Feedback: --------

D.
2,3, 5 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
3
Examine the data in the Orderitems tables

ORDER# ITEM# QUANTITY

---------- ---------- ----------------

1007 2 1

1007 3 1

1007 4 1

1008 1 2

1009 1 1

Evaluate the following query:

select item#, avg(quantity) from orderitems having avg(quantity)


>min(quantity)*0.5 group by item#;

Which statement is true regarding the outcome of the above query?

A.
It gives an error because the having
clause should be specified after the Feedback: --------

GROUP BY clause
B.
It gives an error because all the
aggregate functions used in the HAVING
Feedback: --------
clause must be specified in the SELECT
list.

C.
It displays the item numbers with their
average quantity where the average
Feedback: --------
quantity is more than 0.5 the minimum
quantity of that item in the table

D.
It displays the item numbers with their
average quantity where the average
Feedback: --------
quantity is more than 0.5 the overall
quantity of the items in the table.

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
4
Evaluate the following SQL commands:

CREATE SEQUENCE ord-SEQ

Increment by 10

Start with 120

Maxvalue 9999

Nocycle;

CREATE TABLE ord_items


(ord_no NUMBER (4) DEFAULT ord_seq.NEXTVAL NOT NULL,
Item_no NUMBER(3),qty NUMBER(3) CHECK (qty BETWEEN 100 AND 200),
expiry_date date CHECK (expiry_date >SYSDATE),
CONSTRAINT its_pky PRIMARY KEY (ord_no, item_no),
CONSTRAINT ord_fky FOREIGN KEY(ord_no) REFERENCES orders(order#)
);

The command to create the table fails. What causes the failure?

A.
An error will occur because you cannot
use SYSDATE in the condition of a check Feedback: --------

constraint.

B.
An error will occur because the
BETWEEN clause in the condition of a Feedback: --------

CHECK constraint.

C.
An error will occur because you cannot
use the NEXTVAL sequence value as a Feedback: --------

DEFAULT value for a column.


D.
This piece of code will execute without
Feedback: --------
any errors.

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------

5
Which of the following keywords allows the user to delete a record from a table,
even if rows in another table reference the record through a FOREIGN KEY
constraints?
A. Cascade Feedback: --------

B. Cascade on delete Feedback: --------

C. Delete on cascade Feedback: --------

D. On delete cascade Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
6
Which statement adds a constraint that ensures that the Lastname column of the
CUSTOMERS table of the JustLee Books database holds a value?

A.
Alter table customers add constraint
lastname_nn check customer_name is Feedback: --------

not null;

B.
Alter table customers modify constraint
cust_name_nn check lastname is not Feedback: --------

null;

C.
Alter table customers modify lastname Feedback: --------

constratint cust_name_nn not null;

D.
Alter table customers modify last_name
Feedback: --------
constraints cust_name_nn is not null;

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
7
Examine the structure of the CUSTOMER table:

Create table customer(

Customer# number primary key,

First_name varchar2(25,

Last_name varchar2(25))

Which insert statement is valid?

A.
Insert into customer values (null, john,
Feedback: --------
‘smith’);

B.
Insert into customer values(first_name,
Feedback: --------
last_name) values (‘john’, ‘smith’)

C.
Insert into customer (first_name,
last_name, customer#) values (1000, Feedback: --------

‘john’,’smith’)

D.
Insert into customer values (1000,
Feedback: --------
‘john’, ‘smith’);

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
8
You want to display 5 percent of the books with the highest retail price in the
Books table of the JustLee Books database. Which query will generate the
required result?

A.
Select isbn, title,
retail
from books

order by retail Feedback: --------

fetch first 5 percent rows only;

B.
select isbn, title, retail

from books

order by retail desc Feedback: --------

fetch first 5 percent rows only;

C.
select isbn, title, retail

from books

order by retail desc Feedback: --------

fetch first 5 percent rows only with ties;


D.
select isbn, title, retail

from books
Feedback: --------

order by retail desc

fetch 5 percent rows only;

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

9
The user Alice wants to grant all users query privileges on her Orders table.
Which SQL statement accomplishes this?

A.
Grant select on Orders to all_users; Feedback: --------

B.
Grant select on Orders to_all; Feedback: --------

C.
Grant query on Orders to_public; Feedback: --------

D.
Grant select on Orders to public; Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
10
Which of the following statements assigns the role CUSTOMERREP as the default
role for Maurice Cain with a user name mcain?

A.
Alter role mcain default role
Feedback: --------
customerrep;

B.
Alter user mcain to customerrep; Feedback: --------

C.
Set default role customerrep for mcain; Feedback: --------

D.
Alter user mcain default role
Feedback: --------
custmerrep;

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
11
Examine these statements:

Create role sales;

Grant update on customers to sales;

Grant sales to user1, user2, user3;

What does this set of SQL statements do?

A.
The set of statements contain an error
Feedback: --------
and does not work.

B.
It create a role called SALES, add the
MODIFY privilege on the CUSTOMERS
Feedback: --------
object to the role and gives the SALES
role to the users

C.
It creates a roles called SALES, adds the
UPDATE privilege on the CUSTOMERS
object to the role and gives the SALES
Feedback: --------
role to three users.

D.
It creates a roles called SALES, adds the
UPDATE privilege on the CUSTOMERS
Feedback: --------
object to the role and creates three
users with the role.

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------

12
Which of the following commands eliminates only the user ELPOEZ’s ability to
enter new books in the BOOKS table?

A.
Revoke insert on books from elopez; Feedback: --------

B.
Revoke insert from elopez; Feedback: --------

C.
Revoke insert into from elopez; Feedback: --------

D.
Drop insert into books from elopez;
Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
13
Which two statements are true about WHERE and HAVING clauses?
1.A where clause can be used to restrict both rows and groups
2.A where clause can be used to restrict rows only
3.A having clause can be used to restrict both rows and groups
4.A having clause can be used to restrict groups only
5.A where clause cannot be used in a query if the query uses a having clause
6.A having clause cannot be used in sub queries
Choose the best combination of answers

A.
1 and 2 Feedback: --------

B.
2 and 4 Feedback: --------

C.
2 and 3 Feedback: --------

D.
4 and 5
Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
14
In which of the four statements can a sub query be used?

1.Used in the INTO clause of an INSERT statement


2.Used in the FROM clause of a SELECT statement
3.Used in the GROUP BY clause of a SELECT statement
4.Used in the WHERE clause of a SELECT statement
5.Used in the SET clause of an UPDATE statement
6.Used in the VALUES clause of an INSERT statement
Choose the best combination of answers

A.
1, 2, 3, 4 Feedback: --------

B.
1, 2, 3, 5 Feedback: --------

C.
1, 2, 4, 5 Feedback: --------

D.
1, 2, 5, 6

Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
15
Evaluate the SQL statement:

SELECT ROUND (45.953,-1), TRUNC(45.936,2) FROM dual;

Which values are displayed?

A.
46 and 45 Feedback: --------

B.
46 and 45.93 Feedback: --------

C.
50 and 45.93 Feedback: --------

D.
50 and 45.9 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
16
Which four statements are true regarding views?
1.Data can’t be added to a view column containing an expression
2.Only simple views can use indexes existing on the underlying tables
3.Both simple and complex views can use indexes existing on the underlying
tables
4.Complex views can be created only on multiple tables that exists in the same
schema
5.Complex views can be created on multiple tables that exist in the same or
different schemas
6.Row on a view cannot be deleted through a view if the view definition contains
the DISTINCT keyword
7.If a view is dropped with the DROP VIEW command, the data in the original
table will get affected.
8.DML operations are permitted on non-key-preserved tables
Choose the correct combination.

A.
1,2,3,4 Feedback: --------

B.
1,3,5,6 Feedback: --------

C.
2, 3, 6, 8 Feedback: --------

D.
2, 4, 7, 8 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
17
Evaluate the following create sequence statement:

Create sequence sq1

Increment by 10

Maxvalue 200

Cycle
Nocache;

When you execute the sq1 sequence it generate numbers upto a maximum of
200. After issuing the following SQL statement:

Select seq1.nextval from dual;

What is displayed by the select statement?

A.
1 Feedback: --------

B.
10 Feedback: --------

C.
100 Feedback: --------

D.
An error Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------

18
You create a sequence as follows:

Create sequence seq2


Start with 1

After selecting from the sequence a few times, you want to reinitialize it to
reissue the numbers already generated. How can you do this?

A.
You must drop and recreate the
Feedback: --------
sequence

B.
You can’t. Under no circumstances can
numbers from a sequence be reissued Feedback: --------

once they have been used

C.
Use the command ALTER SEQ2 START
Feedback: --------
WITH 1; to reset the next value to 1.

D.
Use the command ALTER SEQUENCE
SEQ2 CYCLE; to reset the sequence to
its starting value. Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
19
If a column has high selectivity or cardinality, which index type is most
appropriate for that column?

A.
IOT Feedback: --------

B.
B-tree Feedback: --------

C.
Bitmap Feedback: --------

D.
Function based index Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
20
Which of the following B-tree index contains ROWIDs?

A.
Branch blocks Feedback: --------

B.
Root block Feedback: --------

C.
Leaf block Feedback: --------

D.
None of the above because the primary
key is used to identify rows

Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
21
Which two statements are true regarding the USING clause in the table joins?

1.It can be used to join a maximum of three tables


2. It can be used to restrict the number of columns used in a NATURAL join
3.It can be used to access data from tables through equijoins as well as
nonequijoins
4.It can be used to join tables that have columns with the same name and
compatible data types
Choose the best combination of the answers

A.
1 and 2 Feedback: --------

B.
2 and 3 Feedback: --------

C.
2 and 4 Feedback: --------

D.
1 and 4 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
22
Examine the data in the CUSTOMERS table
CUSTOMER# LASTNAME CITY

---------- ---------- ------------

1001 MORALES EASTPOINT

1002 THOMPSON SANTA MONICA

1003 SMITH TALLAHASSEE

1004 PIERSON BOISE

You want to list all cities that have more than one customer along with the
customer details.

Evaluate the following query:

Select c1.lastname

From customers c1 …………………… customers c2

On (c1.city = c2.city and c1.lastname <>c2.lastname);

Which two JOIN options can be used in the blank space in the above query to give
the correct output?

1.JOIN
2.NATURAL JOIN
3.LEFT OUTER JOIN
4.FULL OUTER JOIN
5.RIGHT OUTER JOIN
Choose the best combination of the answers

A.
1 and 2
Feedback: --------
B.
1 and 3
Feedback: --------

C.
1 and 4
Feedback: --------

D.
1 and 5 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

23
Which of the following functions can be used to extract a portion of a character
string?

A.
EXTRACT Feedback: --------

B.
TRUNC Feedback: --------

C.
SUBSTR Feedback: --------

D.
INITCAP Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
24
Which statement is true regarding the INTERSECT operator?

A.
Returns all distinct rows selected by
Feedback: --------
both queries

B.
Returns all distinct rows selected by the
Feedback: --------
first query but not the second

C.
Returns all distinct rows selected
Feedback: --------
by either query

D.
Returns all rows selected by either
Feedback: --------
query, including all duplicates

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
25
Which statement is true regarding the UNION operator?

A.
Feedback: --------
By default the output is not sorted
B.
Null values are not ignored during Feedback: --------
duplicate checking

C.
Names of all columns must be
identical across all select Feedback: --------

statements

D.
The number of columns selected
in all statements need not be the Feedback: --------

same

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
26
You issue the following query:

select avg(max(quantity))
from orderitems
group by item
having avg(max(quantity))>5;

Which statement is true regarding the outcome of this query?

A.
It executes successfully and gives
the correct output Feedback: --------

B.
It gives an error because the
HAVING clause of this query is not
Feedback: --------
valid

C.
It executes successfully but does
not give the correct output Feedback: --------

D.
It gives an error because the Feedback: --------
GROUP BY expression is not valid

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
27
If a column has low selectivity, this means

A.
The column contain many distinct Feedback: --------
values

B.
The column contain a small Feedback: --------
number of distinct values

C.
A WHERE clause is always used in Feedback: --------
a query on a column

D.
The selectivity on a column can’t Feedback: --------
be determined

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
28
You issued the following command:

DROP TABLE BOOKS;

Which three statements are true?

1. All uncommitted transactions are committed

2. All indexes and constraints defined on the table being dropped are also
dropped

3. Sequences used in the Books table becomes invalid

4. The space used by the Books table is reclaimed immediately

5. The Books table can be recovered using the rollback comma

6. The Books table is moved to the recycle bin

A.
1, 2 and 6
Feedback: --------

B.
1, 3 and 6
Feedback: --------

C.
1, 4 and 5
Feedback: --------
D.
2, 3 and 4

Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
29
You want to create a SALES table with the following column specifications and
data types:

· SALESID: Number

· STOREID: Number

· ITEMID: Number
· QTY: Number, should be set to 1 when no value is specified

· SLSDATE: Date, should be set to current date when no value is specified

· PAYMENT: Character up to 30 characters, should be set to CASH when no


value is specified

Which statements would create the table?

A.
CREATE TABLE sales(

salesid NUMBER(4),

storied NUMBER(4),

itemid NUMBER(4),

Feedback: --------
qty NUMBER DEFAULT = 1,

slsdate DATE DEFAULT SYSDATE

payment VARCHAR2(30) DEFAULT =


'CASH');
B.
CREATE TABLE sales(

salesid NUMBER(4),

storieId NUMBER(4),

itemid NUMBER(4),
Feedback: --------
qty NUMBER DEFAULT 1,

slsdate DATE DEFAULT SYSDATE,

payment VARCHAR2(30) DEFAULT


'CASH');

C.
CREATE TABLE sales(

salesid NUMBER(4),

storieId NUMBER(4),

itemid NUMBER(4),
Feedback: --------
qty NUMBER DEFAULT 1,

slsdate DATE DEFAULT 'SYSDATE',

payment VARCHAR2(30) DEFAULT


CASH);
D.
CREATE TABLE sales(

salesid NUMBER(4),

storieId NUMBER(4),

itemid NUMBER(4), Feedback: --------

qty NUMBER DEFAULT= 1,

slsdate DATE DEFAULT SYSDATE,

payment VARCHAR2(30) DEFAULT


= "CASH");

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
30
Examine the structure of the Orders table of the Justlee Books

SQL> desc Orders

Name Null? Type

--------------------- -------- ----------------------------

ORDER# NOT NULL NUMBER(4)

CUSTOMER# NUMBER(4)

ORDERDATE NOT NULL DATE

SHIPDATE DATE

SHIPSTREET VARCHAR2(18)

SHIPCITY VARCHAR2(15)

SHIPSTATE VARCHAR2(2)

SHIPZIP VARCHAR2(5)

SHIPCOST NUMBER(4,2)

Based on the ORDERS table of the JustLee Books database, you want to find the
value of the total shipment of all the orders for each year and you issue the
following command:

SELECT to_char(orderdate, 'rr'),sum(shipcost)


FROM orders

GROUP by to_char(orderdate,'YY');
Which statement is true regarding the outcome?

A.
It executes successfully and gives Feedback: --------
the correct output

B.
It gives an error because the Feedback: --------
TO_CHAR function is not valid

C.
It executes successfully but does Feedback: --------
not give the correct output

D.
It gives an error because the data
type conversion in the SELECT list
does not match the data type Feedback: --------

conversion in the GROUP BY


clause

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
31
Evaluate the SQL statement:

TRUNCATE TABLE BOOKS;

Which of the following three statements are true about the SQL statement.

1. It releases the storage space used by the table

2. It does not release the storage space used by the table

3. You can roll back the deletion of rows after the statement executes

4. You cannot roll back the deletion of rows after the statement executes

5. An attempt to use DESCRIBE on the BOOKS table after the TRUNCATE


statement executes will display an error

6. You must be the owner of the table or have DELETE ANY TABLE system
privilege to truncate the BOOKS table.

A.
2, 3 and 6 Feedback: --------

B.
2, 4 and 5 Feedback: --------

C.
4, 5 and 6 Feedback: --------

D.
1, 4 and 6 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

32
Where can subqueries be used? Choose the best combination of correct answers.

1. Field names in the SELECT statement

2.The FROM clause in the SELECT statement

3. The HAVING clause in the SELECT statement

4. The GROUP BY clause in the SELECT statement

5. The WHERE clause in only the SELECT statement

6. The WHERE clause in SELECT as well as all DML statements

A.
1, 2, 3 and 6 Feedback: --------

B.
2, 4 and 5 Feedback: --------

C.
3, 4, 5 and 6 Feedback: --------

D.
2, 5 and 6 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
33
Which four are types of functions available in SQL? Choose the best combination
of correct answers.

1. String
2. Character
3. Integer
4. Calendar

5. Numeric
6. Translation

7. Date
8. Conversion

A.
1,2,3 and 4 Feedback: --------

B.
2, 4, 5 and 8 Feedback: --------

C.
2, 5, 7 and 8 Feedback: --------

D.
2, 3,6 and 7 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
34
Which view should a user query to display the columns associated with the
constraints on a table owned by a user?

A.
USER_CONSTRAINTS Feedback: --------

B.
USER_OBJECTS Feedback: --------

C.
ALL_CONSTRAINTS Feedback: --------

D.
USER_CONS_COLUMNS Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
35
CREATE TABLE orders(

ord_no NUMBER(2) CONSTRAINT ord_pk PRIMARY KEY,

ord_date DATE,

cust_id NUMBER(4));

CREATE TABLE ord_items

(ord_no NUMBER (2),

Item_no NUMBER(3),

qty NUMBER(3) CHECK (qty BETWEEN 100 AND 200),

expiry_date CHECK (expiry_date >SYSDATE),

CONSTRAINT its_pky PRIMARY KEY(ord_no, item_no),

CONSTRAINT ord_fky FOREIGN KEY(ord_no)REFERENCES orders(order_no)

);

The above SQL statements fail when executed, what could be the reason?

A.
The BETWEEN clause cannot be used
Feedback: --------
with the CHECK constraint

B.
SYSDATE cannot be used with the
Feedback: --------
CHECK constraint
C.
ORD_NO and ITEM_NO cannot be used
as a composite primary key because Feedback: --------

ORD_NO is also a FOREIGN KEY

D.
The CHECK constraint cannot be placed
Feedback: --------
on columns having the DATE data type

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
36
Evaluate the following SQL statement:

DELETE FROM order_items;

If there are no other uncommitted transactions on the ORDER_Items table, which


statement is true about DELETE statement?

A.
It removes all the rows as well as the
Feedback: --------
structure of the table

B.
It removes all the rows in the table and
Feedback: --------
the deleted rows cannot be rolled back

C.
It removes all the rows in the table and
Feedback: --------
the deleted rows can be rolled back

D.
It would not remove the rows if the
Feedback: --------
table has a primary key

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
37
Choose two statements are true regarding USING and ON clauses in table joins?

A. The ON clause can be used to join


tables on columns that have different Feedback: --------

names but compatible data types.

B. A maximum of one pair of columns


can be joined between two tables using Feedback: --------

the ON clause.

C. Both USING and ON clause can be


Feedback: --------
used for equijoins and nonequijoins.

D. The WHERE clause can be used to


apply additional conditions in SELECT
Feedback: --------
statement containing the ON or the
USING clause.

Answer Point Value: 2.0 points


Answer Key: A,D
Correct Feedback: --------
Incorrect Feedback: --------
38
Which statements is true regarding the INTERSECT operator?

A.
It ignores NULL values. Feedback: --------

B.
The number of columns and data
types must be identical for all Feedback: --------

SELECT statements in the query.

C.
The names of columns in all
SELECT statements must be Feedback: --------

identical.

D.
Reversing the order of the
intersected tables will reverse the Feedback: --------

results.

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
39
Which of the following symbols represent concatenation?

A.
* Feedback: --------

B.
|| Feedback: --------

C.
[] Feedback: --------

D.
Feedback: --------
""

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

40
Which of the following commands can be used to view the structure of a table?

A.
SELECT Feedback: --------

B.
DESCRIBE Feedback: --------

C.
CONCATENATION Feedback: --------

D.
TRUNCATE Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
41
Which of the following will display the new price of each book as 20 percent more
than its original cost?

A.
SELECT title, retail * 0.2 "New retail
Feedback: --------
price" FROM books

B.
SELECT title, retail + 0.02 "New Feedback: --------
retail price" FROM books

C.
SELECT title, cost * 1.02 "New Feedback: --------
retail price" FROM books

D.
SELECT title, cost * 1.20 "New Feedback: --------
retail price" FROM books

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
42
Which of the following terms refers to commands that are used to create or
modify database tables?

A.
Data Manipulation Language (DML) Feedback: --------

B.
Data Control Language (DCL) Feedback: --------

C.
Data Definition Language (DDL) Feedback: --------

D.
Data Formatting Language (DFL) Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------

43
Which command instructs Oracle to create a new table from existing data?

A.
CREATE NEW TABLE...………... Feedback: --------

B.
CREATE TABLE …… FROM...……. Feedback: --------

C.
CREATE TABLE ……….AS...…….. Feedback: --------

D.
CREATE TABLE ………... Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
44
Which of the following keywords cannot be used to modify an existing table?

A.
ALTER TABLE …….ADD Feedback: --------

B.
ALTER TABLE …...DROP COLUMN Feedback: --------

C.
ALTER TABLE ……...MODIFY Feedback: --------

D.
ALTER TABLE ……...AS Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

45
Which of the following commands will display the structure of the CUSTOMERS
table?

A.
DESC TABLE customers Feedback: --------

B.
DESCRIBE customers Feedback: --------

C.
DSC customers Feedback: --------

D.
DESCRIBE TABLE customers Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
46
Which of the following commands change a table's name from OLDNAME TO
NEWNAME?

A.
RENAME oldname TO newname; Feedback: --------

B.
RRENAME table FROM oldname to
Feedback: --------
newname;

C.
ALTER TABLE oldname MODIFY TO
Feedback: --------
newname;

D.
CREATE TABLE newname (SELECT *
Feedback: --------
FROM oldname);

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
47
The UNIQUE constraint differs from the PRIMARY KEY constraint in what way?

A.
The UNIQUE constraint does not allow
Feedback: --------
NULL values

B.
The UNIQUE constraint can be created
Feedback: --------
either at column level or at table level

C.
The UNIQUE constraint allows NULL
Feedback: --------
values.

D.
The UNIQUE constraint ensures that a
specific condition is true before a data Feedback: --------

value is added to a table.

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
48
Which keywords identify a column that, if it contains a value, it must match data
contained in another table?

A.
FOREIGN KEY Feedback: --------

B.
PRIMARY KEY Feedback: --------

C.
CHECK CONSTRAINT Feedback: --------

D.
UNIQUE CONSTRAINT Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------

49
Where does the Oracle server store information about objects in the database,
including information about constraints?

A.
In the data reference manual Feedback: --------

B.
In the objects dictionary Feedback: --------

C.
In the data view dictionary Feedback: --------

D.
In the data dictionary Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
50
Based on the structure of the ORDERITEMS table:

SQL> desc orderitems

Name Null? Type

-------------- -------- -----------------

ORDER# NOT NULL NUMBER(4)

ITEM# NOT NULL NUMBER(2)

ISBN VARCHAR2(10)

QUANTITY NOT NULL NUMBER(3)

PAIDEACH NOT NULL NUMBER(5,2)

SQL> desc books

Name Null? Type

--------------- -------- --------------

ISBN NOT NULL VARCHAR2(10)

TITLE VARCHAR2(30)

PUBDATE DATE

PUBID NUMBER(2)

COST NUMBER(5,2)

RETAIL NUMBER(5,2)

DISCOUNT NUMBER(4,2)

CATEGORY VARCHAR2(12)
Which of the following commands will make certain that the ISBN entered in the
ORDERITEMS table actually exists in the ISBN column of the BOOKS table?

A.
ALTER TABLE orderitems ADD FOREIGN
KEY isbn REFERENCES BOOKS TABLE Feedback: --------

(isbn);

B.
ALTER TABLE orderitems MODIFY
FOREIGN KEY (isbn) REFERENCES Feedback: --------

books(isbn);

C.
ALTER TABLE orderitems CREATE
FOREIGN KEY (isbn) REFERENCES Feedback: --------

books(isbn);

D.
ALTER TABLE orderitems ADD FOREIGN
Feedback: --------
KEY (isbn) REFERENCES books(isbn);

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
51
Which one of the following commands is used to add data to an existing row in a
table?

A.
ADD Feedback: --------

B.
UPDATE Feedback: --------

C.
INSERT Feedback: --------

D.
RENAME Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

52
Which one of the following commands is used to remove rows from a table?

A.
DELETE Feedback: --------

B.
DROP Feedback: --------

C.
REMOVE Feedback: --------

D.
MODIFY Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
53
SQL> select pubid, name, contact, phone from publisher;

PUBID NAME CONTACT PHONE


---------- -------------- --------------- ----------
--
1 PRINTING IS US TOMMIE SEYMOUR 000-714-
8321
2 PUBLISH OUR WAY JANE TOMLIN 010-410-
0010
3 AMERICAN PUBLISHING DAVID DAVIDSON 800-555-
1211
4 READING MATERIALS INC. RENEE SMITH 800-555-
9743
5 REED-N-RITE SEBASTIAN JONES 800-555-
8284

Which of the following commands will delete only publisher 4 from the PUBLISHER
table?

A.
DELETE FROM publisher Feedback: --------

B.
DELETE pubid = 4 FROM publisher Feedback: --------

C.
DROP FROM publisher WHERE pubid=4 Feedback: --------

D.
DELETE FROM publisher WHERE pubid =
Feedback: --------
4

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
54
Based on the contents of the PUBLISHER table.

SQL> select pubid, name, contact, phone from publisher;

PUBID NAME CONTACT


PHONE
---------- -------------- ---------------
------------
1 PRINTING IS US TOMMIE SEYMOUR
000-714-8321
2 PUBLISH OUR WAY JANE TOMLIN
010-410-0010
3 AMERICAN PUBLISHING DAVID DAVIDSON
800-555-1211
4 READING MATERIALS INC. RENEE SMITH
800-555-9743
5 REED-N-RITE SEBASTIAN JONES
800-555-8284

Which of the following will add a new record to the table?

A.
INSERT INTO publisher VALUES('BOOKS
Feedback: --------
MADE CHEAP', '800-111-2222');

B.
INSERT INTO publisher (pubid,
name) VALUES(6, 'BOOKS MADE Feedback: --------

CHEAP');
C.
UPDATE publisher VALUES('BOOKS
Feedback: --------
MADE CHEAP', '800-111-2222');

D.
UPDATE publisher(pubid, name)
VALUES('BOOKS MADE CHEAP', Feedback: --------

'800-111-2222');

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

55
Which one of the following commands is used to create a function based index?

A.
CREATE FUNCTION INDEX …..ON Feedback: --------

B.
CREATE INDEX ……...ON Feedback: --------

C.
CREATE INDEX...…..FOR Feedback: --------

D.
CREATE INDEX ………..FUNCTION Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
56
Which one of the following commands are used to create a user account?

A.
CREATE NEW USER username
Feedback: --------
IDENTIFIED BY password

B.
CREATE USERNAME username IDENTITY
Feedback: --------
password

C.
CREATE USER username PASSWORD
Feedback: --------
password

D.
CREATE USER username IDENTIFIED BY
Feedback: --------
password

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
57
Which command will delete a user account from a database?

A.
DELETE USER username Feedback: --------

B.
DELETE USER username IDENTIFIED BY
Feedback: --------
password

C.
DROP USER username IDENTIFIED BY
Feedback: --------
password

D.
DROP USER username Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

58
Which of the following SQL statements will create a new role named PRCLERK?

A.
CREATE prclerk; Feedback: --------

B.
CREATE ROLE prclerk; Feedback: --------

C.
CREATE ROLE as prclerk; Feedback: --------

D.
CREATE prclerk as ROLE; Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
59
A TOP-N analysis is performed by implementing the rows with:_________

A.
The highest ROWNUM values Feedback: --------

B.
A ROWNUM greater than or equal to N Feedback: --------

C.
The lowest ROWNUM values Feedback: --------

D.
A ROWNUM value less than or equal to
Feedback: --------
N

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
60
How do you assign names to the columns in a VIEW?

A.
Assign aliases in the subquery and the
Feedback: --------
aliases are used for column names.

B.
Use the ALTER VIEW command to
Feedback: --------
change column names.

C.
Assign names for up to three columns in
the CREATE VIEW clause before the Feedback: --------

subquery is listed in the AS clause

D.
None of the above - because columns
cannot be assigned names for a view, Feedback: --------

they must keep their original names.

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
61
Which of the following operators is considered a single row operator?

A.
IN Feedback: --------

B.
ALL Feedback: --------

C.
Feedback: --------
<>

D.
<>ALL Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
62
What does the following query do?

SELECT isbn, title FROM books

WHERE (pubid, category) IN


(SELECT pubid, category

FROM books WHERE title LIKE %ORACLE%’);

A.
It determines which publisher published
a book belonging to the oracle category
and then lists all other books published
Feedback: --------
by the same publisher.

B.
It lists all publishers and categories
containing the value oracle.
Feedback: --------

C.
It lists the ISBN and title of all books
belonging to the same category and
having the same publisher as any book
Feedback: --------
with the phrase ORACLE in its title.

D.
None of the above. The query contains
a multiple row operator and because
the inner query only returns one value, Feedback: --------

the select statement will fail and return


an error message.

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
63
Consider the contents of the PUBLSIHER table.

PUBID NAME CONTACT PHONE

---------- -------------- --------------- - -----------


1 PRINTING IS US TOMMIE SEYMOUR 000-714-
8321
2 PUBLISH OUR WAY JANE TOMLIN 010-410-
0010
3 AMERICAN PUBLISHING DAVID DAVIDSON 800-555-
1211
4 READING MATERIALS INC. RENEE SMITH 800-555-
9743
5 REED-N-RITE SEBASTIAN JONES 800-555-
8284

Which of the following lists only the last four digits of the contact person's phone
numbers at America Publishing?

A.
SELECT EXTRACT (phone, -4,1) FROM
publisher WHERE name = ‘AMERICAN Feedback: --------

PUBLISHING’;

B.
SELECT SUBSTR(phone, -4,1) FROM
publisher WHERE name = ‘AMERICAN Feedback: --------

PUBLISHING’;

C.
SELECT EXTRACT(phone, -1,4) FROM
publisher WHERE name = ‘AMERICAN Feedback: --------

PUBLISHING’;
D.
SELECT SUBSTR(phone, -4,4) FROM
publisher WHERE name = ‘AMERICAN Feedback: --------

PUBLISHING’;

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

64
Which of the following queries contains an equality join?

A.
SELECT title, authorid FROM books,
bookauthor WHERE books.isbn =
bookauthor.isbn and retail >20; Feedback: --------

B.
SELECT title, name FROM books CROSS
JOIN publisher;
Feedback: --------

C.
SELECT title, gift FROM books,
promotion WHERE retail >= minretail
and retail <= maxretail; Feedback: --------

D.
Feedback: --------
None of the above

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
65
Which of the following allows NULL values in calculations?

A.
SUM Feedback: --------

B.
NVL Feedback: --------

C.
NOT NULL Feedback: --------

D.
MIN Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
66
Which type of a join is used in the following statement?

select title, order#, quantity

from BOOKS full join ORDERITEMS

on BOOKS.ISBN = ORDERITEMS.ISBN

A.
equality Feedback: --------

B.
self join Feedback: --------

C.
non-equality Feedback: --------

D.
outer join Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
67
If a column alias contains a blank space, it must be enclosed in __________.

A.
Single quotation marks (' '). Feedback: --------

B.
Asterisks (* *). Feedback: --------

C.
Percent signs (% %). Feedback: --------

D.
Double quotation marks (" "). Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

68
To indicate which database table contains the data to be selected by a query, the
table name should be listed in the ____________clause.

A.
WHERE Feedback: --------

B.
SELECT Feedback: --------

C.
HAVING Feedback: --------

D.
FROM Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
69
Which of the following commands will increase the size of the CITY column in the
CUSTOMERS table from 12 to 20 and increase size of the LASTNAME column from 10 to
14?

A.
ALTER TABLE customers MODIFY (city
Feedback: --------
VARCHAR2(+8), lastname VARCHAR2(+4));

B.
ALTER TABLE customers MODIFY (city
Feedback: --------
VARCHAR2(20), lastname VARCHAR2(14));

C.
ALTER TABLE customers MODIFY (city (+8),
Feedback: --------
lastname (+4));

D.
ALTER TABLE customers MODIFY (city (20),
Feedback: --------
lastname (14));

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
70
Which one of the following options allow a user to grant system privileges to other users?

A.
WITH GRANT OPTION Feedback: --------

B.
WITH ADMIN OPTION Feedback: --------

C.
WITH DBA ROLES Feedback: --------

D.
WITH ASSIGN ROLES Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

71
Which of the following is not a type of a constraint in Oracle?

A.
CHECK Feedback: --------

B.
UNIQUE Feedback: --------

C.
REFERENCE Feedback: --------

D.
NOT NULL Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
72
Which of the following keywords must have been included during the creation of a
FOREIGN KEY constraint to allow a row from the parent table to be deleted, even if it is
referenced by a row in the child table?

A.
CASCADE Feedback: --------

B.
ON DELETE AUTO REMOVE Feedback: --------

C.
ON DELETE CASCADE Feedback: --------

D.
ON REMOVE CASCAADE Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
73
Consider the ORDERITEMS Table.

SQL> DESC ORDERITEMS

Name Null? Type


----------- -------- - ---------------------------
ORDER# NOT NULL NUMBER(4)
ITEM# NOT NULL NUMBER(2)
ISBN VARCHAR2(10)
QUANTITY NOT NULL NUMBER(3)
PAIDEACH NOT NULL NUMBER(5,2)

If a PRIMARY KEY constraint, named ORDERITEMS_PK, exists for the ORDER# and ITEM#
columns of the ORDERITEMS table, which of the following commands will disable the
constraint?

A.
ALTER TABLE orderitems DISABLE PRIMARY
Feedback: --------
KEY CONSTRAINT;

B.
ALTER TABLE orderitems DISABLE PRIMARY
Feedback: --------
KEY CONSTRAINT;

C.
ALTER TABLE orderitems REMOVE PRIMARY
Feedback: --------
KEY CONSTRAINT;

D.
ALTER TABLE orderitems MODIFY PRIMARY
Feedback: --------
KEY CONSTRAINT DISABLE;

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
74
Consider the PROMOTION table

SQL> DESC PROMOTION

Name Null? Type


------------------- -------- ----------------------
GIFT VARCHAR2(15)
MINRETAIL NUMBER(5,2)
MAXRETAIL NUMBER(5,2)

Which of the following commands will add a UNIQUE constraint to the MINRETAIL column
of the PROMOTION table?

A.
ALTER TABLE promotion MODIFY UNIQUE
Feedback: --------
(minretail);

B.
ALTER TABLE promotion ADD CONSTRAINT
orderitems_minretail_uk UNIQUE Feedback: --------

(minretail);

C.
ALTER TABLE promotion ADD UNIQUE
Feedback: --------
minretail;

D.
ALTER TABLE promotion MODIFY
Feedback: --------
minretail;

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
75
Which command is used to prevent other users from making changes to a table?

A.
COMMIT Feedback: --------

B.
LOCK TABLE Feedback: --------

C.
BLOCK Feedback: --------

D.
COMMIT TABLE Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

76
Evaluate the following SQL statement:

SELECT TO_CHAR(1230,'00,999.99') FROM DUAL;

A.
01,230.00 Feedback: --------

B.
230,01.00 Feedback: --------

C.
01,230 Feedback: --------

D.
1,230.00 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
77
Which one of the following is defined in Oracle as simply anything that has a
name and a defined structure?

A.
object Feedback: --------

B.
index Feedback: --------

C.
synonym Feedback: --------

D.
sequence Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
78
Which if the following statements is not true about the ORDERBY clause?

A.
When using the ORDER BY clause, it
always appears as the last clause in a Feedback: --------

SELECT statement.

B.
The ORDER BY clause may
appear in a SELECT statement Feedback: --------
that does not contain a WHERE
clause.

C.
Positional sorting is
accomplished by specifying the
numeric position of a column as Feedback: --------

it appears in the SELECT list, in


the ORDER BY clause.

D.
The ORDER BY clause
specifies one or more terms by
which the retrieved rows are Feedback: --------

sorted. These terms can only be


column names.

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
79
If a SELECT statement has WHERE, GROUP BY and HAVING clauses, what is the order in
which they are processed?

A.
HAVING, WHERE, GROUP BY Feedback: --------

B.
WHERE, GROUP BY, HAVING Feedback: --------

C.
WHERE, HAVING, GROUP BY Feedback: --------

D.
GROUP BY, WHERE, HAVING Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

80
Which of the following commands can be used to revoke system or object privileges
previously granted to a user?

A.
UNGRANT Feedback: --------

B.
REMOVE Feedback: --------

C.
REVOKE Feedback: --------

D.
DROP Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
81
Consider the structure of the ORDERS table.

SQL> desc orders;

Name Null? Type


----------------------- -------- ----------------------------
ORDER# NOT NULL NUMBER(4)
CUSTOMER# NUMBER(4)
ORDERDATE NOT NULL DATE
SHIPDATE DATE
SHIPSTREET VARCHAR2(18)
SHIPCITY VARCHAR2(15)
SHIPSTATE VARCHAR2(2)
SHIPZIP VARCHAR2(5)
SHIPCOST NUMBER(4,2)

Which one of the following statements returns all the fields in the ORDERS table?

A.
SELECT order#, customer#, date,
Feedback: --------
address FROM orders;

B.
SELECT all FROM orders; Feedback: --------

C.
SELECT * FROM orders Feedback: --------

D.
SELECT order#,*,*,*,*,*,*,* FROM orders Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
82
Consider the structure of the BOOKS table.

SQL> desc books;

Name Null? Type


---------------- -------- ----------------------------
ISBN NOT NULL VARCHAR2(10)
TITLE VARCHAR2(30)
PUBDATE DATE
PUBID NUMBER(2)
COST NUMBER(5,2)
RETAIL NUMBER(5,2)
DISCOUNT NUMBER(4,2)
CATEGORY VARCHAR2(12)

Which one of the following is not a valid SELECT statement?

A.
SELECT cost - retail FROM books; Feedback: --------

B.
SELECT retail + cost FROM books; Feedback: --------

C.
SELECT retail^3 from books; Feedback: --------

D.
SELECT retail*retail*retail FROM books; Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
83
Which one of the following commands create a new table containing two
columns?

A.
CREATE newtable (col1 DATE, col2
Feedback: --------
VARCHAR2);

B.
CREATE TABLE newtable (col1 DATE,
Feedback: --------
col2 VARCHAR2);

C.
CREATE TABLE newtable (SELECT col1,
Feedback: --------
col2 FROM tablename);

D.
CREATE TABLE newtable (col1 DATE
Feedback: --------
DEFAULT SYSDATE, col2 VARCHAR1(1));

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
84
Which object in the data dictionary enables you to verify DEFAULT column
settings?

A.
DEFAULT_COLUMNS Feedback: --------

B.
USER_TAB_COLUMNS Feedback: --------

C.
DBA_TAB_COLUMNS Feedback: --------

D.
DEF_TAB_COLUMNS Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
85
Which one of the following is a valid SQL statement?

A.
CREATE TABLE table1

(col1 NUMBER PRIMARY KEY,

Col2 VARCHAR2(20) PRIMARY KEY, Feedback: --------

Col3 DATE DEFAULT SYSDATE,

Col4 VARCHAR2(2));

B.
CREATE TABLE table1

(col1 NUMBER,

Col2 VARCHAR2(20), Feedback: --------

Col3 DATE DEFAULT SYSDATE,

Col4 VARCHAR2(2));

C.
CREATE TABLE table1

(col1 NUMBER PRIMARY KEY,

Col2 VARCHAR2(20),
Feedback: --------

Col3 DATE,

Col4 VARCHAR2(2) NOT NULL, CONSTRAINT


table_col3_ck CHECK (col3 = SYSDATE));
D.
CREATE TABLE table1

(col1 NUMBER,

Col2 VARCHAR2(20),
Feedback: --------

Col3 DATE,

Col4 VARCHAR2(2),

PRIMARY KEY (REFERENCES(col1)));

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

86
Choose a command that can be used to enable a disabled constraint.

A.
ALTER TABLE …………..MODIFY Feedback: --------

B.
ALTER TABLE …………...ADD Feedback: --------

C.
ALTER TABLE ………….DISABLE Feedback: --------

D.
ALTER TABLE …………..ENABLE Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
87
Assuming the CUSTOMER table has three columns (col1, col2, col3) in this order, which of
the following commands stores a NULL value in col3 of the CUSTOMER table?

A.
INSERT INTO customes values ('A', 'B',
Feedback: --------
'C');

B.
INSERT INTO customer VALUES (NULL,
Feedback: --------
'A', 'B');

C.
UPDATE customers SET col1 = col3; Feedback: --------

D.
INSERT INTO customer (col3, col1, col2)
Feedback: --------
VALUES (NULL, 'A', 'B');

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
88
Which syntax is correct for removing a public synonym?

A.
DROP SYNONYM synonym_name; Feedback: --------

B.
DROP PUBLIC SYNONYM
Feedback: --------
synonym_name;

C.
DELETE SYNONYM synonym_name ; Feedback: --------

D.
DELETE PUBLIC SYNONYM
Feedback: --------
synonym_name;

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------

89
Which of the following can’t be modified with the ALTER SEQUENCE command?

A.
INCREMENT BY Feedback: --------

B.
START WITH Feedback: --------

C.
MINVALUE Feedback: --------

D.
MAXVALUE Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
90
Consider some data extracted from the CUSTOMERs table.

FIRSTNAME LASTNAME
---------- ----------
BONITA MORALES
RYAN THOMPSON
LEILA SMITH
THOMAS PIERSON
CINDY GIRARD
MESHIA CRUZ
TAMMY GIANA

Which of the following includes a customer with the first name BONITA in the
results?

A.
SELECT * FROM customers Feedback: --------
WHERE firstname = ‘B%’;

B.
SELECT* FROM customers Feedback: --------
WHERE firstname = ‘_B%’;

C.
SELECT * FROM customers Feedback: --------
WHERE firstname LIKE ‘%N%’;

D.
SELECT * FROM customers Feedback: --------
WHERE firstname = LIKE ‘%N%’;

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------
91
Consider the structure of the CUSTOMERS and ORDERS tables.

SQL> desc customers

Name Null? Type


---------------------- -------- - ---------------------------
CUSTOMER# NOT NULL NUMBER(4)
LASTNAME NOT NULL VARCHAR2(10)
FIRSTNAME NOT NULL VARCHAR2(10)
ADDRESS VARCHAR2(20)
CITY VARCHAR2(12)
STATE VARCHAR2(2)
ZIP VARCHAR2(5)
REFERRED NUMBER(4)
REGION CHAR(2)
EMAIL VARCHAR2(30)

SQL> desc orders


Name Null? Type
-------------------- -------- ----------------------------
ORDER# NOT NULL NUMBER(4)
CUSTOMER# NUMBER(4)
ORDERDATE NOT NULL DATE
SHIPDATE DATE
SHIPSTREET VARCHAR2(18)
SHIPCITY VARCHAR2(15)
SHIPSTATE VARCHAR2(2)
SHIPZIP VARCHAR2(5)
SHIPCOST NUMBER(4,2)

Given the following query:

SELECT lastname, firstname, order#

FROM customers LEFT OUTER JOIN orders USING (customer#) ORDER BY customer#;

Which of the following queries return the same results?


A.
SELECT lastname, firtsname, order#
FROM customers c OUTER JOIN orders o ON
c.customer# = o.customer#
Feedback: --------
ORDER BY c.customer#;

B.
SELECT lastname, firstname, order#

FROM customers c, orders o WHERE Feedback: --------

c.customer# = o.customer# (+)


ORDER BY c.customer#;

C.
SELECT lastname, firstname, order#

FROM orders o RIGHT OUTER JOIN


customers c ON c.customer# =
Feedback: --------
o.customer#
ORDER BY c.customer#;

D.
Non of the above.
Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
92
Which one of the following SELECT statements returns 30 as a result?

A.
SELECT ROUND (24.37, 2) FROM dual; Feedback: --------

B.
SELECT TRUNC(29.99, 2) FROM dual; Feedback: --------

C.
SELECT ROUND (29.01, -1) FROM dual; Feedback: --------

D.
SELECT TRUNC(29.99, -1) FROM dual; Feedback: --------

Answer Point Value: 2.0 points


Answer Key: C
Correct Feedback: --------
Incorrect Feedback: --------

93
What is the correct solution for the arithmetic expression 2+8/2*9/3 using the
order of operations employed by Oracle 12c when solving equations?

A.
14 Feedback: --------

B.
15 Feedback: --------

C.
4.8 Feedback: --------

D.
0.1 Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
94
Which of the following is an interface tool that allows a user to create, edit, and
manipulate data in Oracle?

A.
SQL Feedback: --------

B.
SQL* PLUS Feedback: --------

C.
SCRIPT Feedback: --------

D.
COMMAND LINE Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
95
Which keywords are used to complete the deletion of a column previously
marked with SET UNUSED?

A.
DELETE UNUSED COLUMNS Feedback: --------

B.
DROP UNUSED COLUMNS Feedback: --------

C.
UNSET UNUSED COLUMNS Feedback: --------

D.
DROP SET COLUMNS Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
96
Which data dictionary object contains a column named HIDDEN_COLUMN?

A.
USER_HIDE_COLS Feedback: --------

B.
USER_TABLES Feedback: --------

C.
USER_COLUMNS Feedback: --------

D.
USER_TAB_COLS Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

97
Which keyword permanently saves changed data in a table?

A.
COMMIT Feedback: --------

B.
SAVE Feedback: --------

C.
UPDATE Feedback: --------

D.
ADD Feedback: --------

Answer Point Value: 2.0 points


Answer Key: A
Correct Feedback: --------
Incorrect Feedback: --------
98
Which command creates a synonym for a table?

A.
CREATE SYNONYM synonyname IN
Feedback: --------
tablename;

B.
CREATE SYNONYM synonymname ON
Feedback: --------
tablename;

C.
CREATE SYNONYM synonymname
Feedback: --------
REFERENCES tablename;

D.
CREATE SYNONYM synonyname FOR
Feedback: --------
tablename;

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------
99
Your database server is in Beijing, China. You are supporting an
application with user sessions originating out of Beijing and Atlanta.
You wish to ensure that your application stores dates in such a way
that if your Beijing team stores date time data, such as “9 PM
Beijing”, your Atlanta users will see “9 PM Beijing” instead of the
equivalent time in Atlanta. Which datatype is the best choice?
TIMESTAMP b. TIMESTAMP WITH TIME ZONE c. TIMESTAMP WITH LOCAL TIME
ZONE d. It cannot be done

A.
TIMESTAMP Feedback: --------

B.
TIMESTAMP WITH TIME ZONE Feedback: --------

C.
TIME STAMP WITH LOCAL TIME ZONE Feedback: --------

D.
iT CANNOT BE DONE Feedback: --------

Answer Point Value: 2.0 points


Answer Key: B
Correct Feedback: --------
Incorrect Feedback: --------
100
Which of the following displays a list of all system privileges available in Oracle?

A.
SESSION_PRIVS Feedback: --------

B.
SYS_PRIVILEGE_MAP Feedback: --------

C.
V$SYSTEM_PRIVILEDGES Feedback: --------

D.
SYSTEM_PRIVILEDGE_MAP Feedback: --------

Answer Point Value: 2.0 points


Answer Key: D
Correct Feedback: --------
Incorrect Feedback: --------

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy