Modified True/False Indicate
whether the statement is true or false. If false, change the identified word or phrase to make
the statement true.
|
|
|
1.
|
The DROP command can be used to remove rows from an existing table.
_________________________
|
|
|
2.
|
After a COMMIT command is executed, the ROLLBACK command will have no
affect on the changed data. _________________________
|
|
|
3.
|
A NULL value can be included in the data being added to a table by explicitly
entering the word NULL. _________________________
|
|
|
4.
|
The WHERE clause of the UPDATE command is used to specify exactly which
rows should be changed. _________________________
|
|
|
5.
|
The variable name of a substitution variable is preceded by a(n) percent
sign. _________________________
|
|
|
6.
|
If the WHERE clause is omitted from the DELETE command, then all columns
from the database table will be dropped. _________________________
|
|
|
7.
|
A(n) exclusive lock prevents other users from changing the data stored in
the table. _________________________
|
|
|
8.
|
A(n) shared lock prevents other users from obtaining another shared lock
on the same table. _________________________
|
|
|
9.
|
When DDL operations are performed, Oracle10g will automatically place
a(n) shared lock on the table. _________________________
|
Multiple Choice Identify the
choice that best completes the statement or answers the question.
|
|
|
10.
|
Which command is used to prevent other users from making changes to a
table?
a. | COMMIT | c. | BLOCK | b. | COMMIT TABLE | d. | LOCK TABLE |
|
|
|
11.
|
Use the ____ keyword to enter the computer's date as a data value in the
INSERT command.
a. | SYSTEMDATE | c. | SYSDATE | b. | DATE | d. | COMPDATE |
|
|
|
12.
|
When inserting a row into a table, how can you indicate that a row contains a
NULL value?
a. | In the VALUES clause, substitute two single quotation marks for the NULL
value. | b. | In the VALUES clause, include the keyword NULL in the position where the value should
be listed. | c. | In the VALUES clause, include a blank space in the position where the value should be
listed. | d. | both a and b |
|
|
|
13.
|
What will happen if you try to use the INSERT
command to insert a NULL value into a column that has been assigned a PRIMARY KEY constraint?
a. | The command will execute because a PRIMARY KEY value can be NULL. | b. | An error message is
returned and the row is not added to the table. | c. | The command will execute because only a UNIQUE
constraint forbids NULL values. | d. | An error message is returned but the unaffected
portion of the row is added to the table. |
|
|
|
14.
|
The column to be updated by the UPDATE command is specified in the ____
clause.
a. | UPDATE | c. | WHERE | b. | SET | d. | COL |
|
|
|
15.
|
The row(s) to be updated by the UPDATE command is specified by the ____
clause.
a. | UPDATE | c. | WHERE | b. | SET | d. | COL |
|
|
|
16.
|
When does a COMMIT command explicitly
occur?
a. | When the user executes COMMIT;. | b. | When the user issues a DDL command such as
CREATE or ALTER TABLE. | c. | When the user executes
ROLLBACK;. | d. | When the user exists the system. |
|
|
|
17.
|
Which of the following statements about COMMIT and ROLLBACK commands is
incorrect?
a. | All DML commands (INSERT, UPDATE, DELETE) are explicitly committed and cannot be
rolled back. | b. | All DDL commands (CREATE, TRUNCATE, ALTER TABLE) are explicitly committed and cannot
be rolled back. | c. | A ROLLBACK command will reverse all DML operations performed since the last COMMIT
was performed. | d. | all of the above |
|
|
|
18.
|
When does a COMMIT command implicitly
occur?
a. | When the user executes COMMIT;. | b. | When the user issues a DDL command such as
CREATE or ALTER TABLE. | c. | When the user executes
ROLLBACK;. | d. | When the computer loses power unexpectedly. |
|
|
|
19.
|
The effect of which of the following commands can never be reversed by the
ROLLBACK command?
a. | CREATE TABLE | c. | COMMIT | b. | ALTER TABLE | d. | all of the
above |
|
|
|
20.
|
The ____ command can be used to view the contents of a record when it is
anticipated that the record will need to be modified. It places a shared lock on the record(s) to be
changed and prevents any other user from acquiring a lock on the same record(s).
a. | SELECT...LOCK TABLE | c. | SELECT...FOR UPDATE | b. | COMMIT...LOCK TABLE | d. | COMMIT...FOR
UPDATE |
|
|
|
Contents of the PROMOTION table 
|
|
|
21.
|
Based on the contents of the PROMOTION table, which of the following commands
will delete only the row for the Free Bookmark from the table?
a. | DELETE FROM promotion; | b. | DELETE gift FROM promotion; | c. | DELETE gift FROM
promotion WHERE gift = 'BOOKMARKER'; | d. | DELETE FROM promotion WHERE gift =
'BOOKMARKER'; |
|
|
|
22.
|
Which of the following SQL statements will insert a new row into the PROMOTION
table?
a. | INSERT INTO promotion (gift, minretail, maxretail) VALUES (FREE BOOK, 75.01,
89.99); | b. | INSERT INTO promotion (gift, minretail, maxretail) VALUES ('FREE BOOK',
75.01, 89.99); | c. | INSERT INTO promotion VALUES (FREE BOOK, 75.01, 89.99); | d. | both a and
c |
|
|
|
23.
|
Based on the contents of the PROMOTION table, which of the following will
correctly change the value assigned to the MAXRETAIL column for Free Shipping to 75.00?
a. | INSERT INTO promotion (maxretail) VALUES (75) WHERE gift = 'FREE
SHIPPING'; | b. | UPDATE promotion (maxretail) SET = 75 WHERE gift = 'FREE
SHIPPING'; | c. | UPDATE promotion SET maxretail = 75 WHERE gift = 'FREE
SHIPPING'; | d. | none of the above |
|
|
|
24.
|
If a new row is added to the PROMOTION table, which of the following will make
the change permanent?
a. | COMMIT; | b. | UPDATE; | c. | ROLLBACK; | d. | The change is permanent when the command is
executed. |
|
|
|
Contents of the PUBLISHER table 
|
|
|
25.
|
Which of the following commands will delete only publisher 4 from the PUBLISHER
table?
a. | DELETE FROM publisher; | b. | DELETE pubid = 4 FROM
publisher; | c. | DROP FROM publisher WHERE pubid = 4; | d. | DELETE FROM publisher WHERE pubid =
4; |
|
|
|
26.
|
Based on the contents of the PUBLISHER table, which of the following SQL
statements will change the phone number for Printing Is Us to 800-714-8321?
a. | UPDATE publisher REPLACE phone WITH '800-714-8321' WHERE pubid =
1; | b. | UPDATE publisher REPLACE phone = '800-714-8321' WHERE pubid =
1; | c. | UPDATE publisher SET phone = '800-714-8321' WHERE pubid =
1; | d. | none of the above |
|
|
|
27.
|
Based on the contents of the PUBLISHER table, which of the following will add a
new record to the table?
a. | INSERT INTO publisher VALUES ('BOOKS MADE CHEAP',
'800-111-2222'); | b. | INSERT INTO publisher (pubid, name) VALUES
(6, 'BOOKS MADE CHEAP'); | c. | UPDATE publisher VALUES ('BOOKS MADE
CHEAP', '800-111-2222'); | d. | UPDATE publisher (pubid, name) VALUES (6,
'BOOKS MADE CHEAP'); |
|
Completion Complete each
statement.
|
|
|
28.
|
The ____________________ command is used to add new rows to a table.
|
|
|
29.
|
The ____________________ command is used to add data to an existing row in a
table.
|
|
|
30.
|
The ____________________ command is used to remove rows from a table.
|