Chapter 5 - Data Manipulation & Transaction Control

E. Both a and b are correct

Which of the following is a correct statement?
A. A commit is issued implicitly when a user exits SQL Developer or SQL *Plus.
B. A commit is issued implicitly when a DDL command is executed.
C. A commit is issue automatically when a DML command is execute

D. rollback;

Which of the following is a valid SQL statement?
A. SELECT * WHERE amid='J100' FOR UPDATE;
B. INSERT INTO homework10 VALUES (SELECT * FROM acctmanager);
C. DELETE amid FROM acctmanager;
D. rollback;
E. all of the above

A. INSERT INTO

Which of the following commands can be used to add rows to a table?
A. INSERT INTO
B. ALTER TABLE ADD
C. UPDATE
D. SELECT...FOR UPDATE

C. DELETE FROM homework10;

Which of the following statements deletes all rows in the HOMEWORK10 table?
A. DELETE * FROM homework10;
B. DELETE
.
FROM homework10;
C. DELETE FROM homework10;
D. DELETE FROM homework10 WHERE amid='*';
E. Both c and d delete all rows in the HOMEWORK tabl

A. SELECT * FROM homework10 WHERE col2 IS NULL FOR UPDATE;

Which of the following statements places a shared lock on at least a portion of a table named HOMEWORK10?
A. SELECT * FROM homework10 WHERE col2 IS NULL FOR UPDATE;
B. INSERT INTO homework10 (col1, col2, col3) VALUES ('A', 'B', 'C');
C. UPDATE homework10

B. INSERT INTO homework10 (col3, col2, col1) VALUES (NULL, 'A', 'B');

Assuming the HOMEWORK10 table has three columns (Col1, Col2, and Col3 in this order), which of the following commands stores a NULL value in Col3 of the HOMEWORK10 table?
A. INSERT INTO homework10 VALUES ('A', 'B', 'C');
B. INSERT INTO homework10 (col3, c

A. &

Which of the following symbols designates a substitution variable?
A. &
B. $
C. #
D. _

B. 'O''hara' (two single quotes following O)

Which of the following input values results in a successful INSERT of O'hara?
A. 'O^hara'
B. 'O''hara' (two single quotes following O)
C. 'O''hara' (a double quote following the O)
D. Data values can't contain quotes

B. LOCK TABLE homework10 IN EXCLUSIVE MODE;

Which of the following commands locks the HOMEWORK10 table in EXCLUSIVE mode?
A. LOCK TABLE homework10 EXCLUSIVELY
B. LOCK TABLE homework10 IN EXCLUSIVE MODE;
C. LOCK TABLE homework10 TO OTHER USERS;
D. LOCK homework10 IN EXCLUSIVE MODE;
E. Both b and d l

C. Col3 is defined as a DATE column.

You issue the following command: INSERT INTO homework10 (col1, col2, col3) VALUES ('A', NULL, 'C'). The command will fail if which of the following statements is true?
A. Col1 has a PRIMARY KEY constraint enabled
B. Col2 has a UNIQUE constraint enabled.
C

E. All of the above

Which of the following releases a lock currently held by a user on the HOMEWORK10 table?
A. A COMMIT command is issued.
B. A DDL command is issued to end a transaction
C. The user exits the system
D. A ROLLBACK command is issued
E. All of the above
F. Non

C. Other users can view the new orders as soon as you exit the system or execute a COMMIT command.

Assume you have added eight new orders to the ORDERS table. Which of the following is true?
A. Other users can view the new orders as soon as you execute the INSERT INTO command.
B. Other users can view the new orders as soon as you issue a ROLLBACK comma

A. DELETE FROM orders WHERE orderdate <'01-APR-09';

Which of the following commands removes all orders placed before April 1, 2009?
A. DELETE FROM orders WHERE orderdate <'01-APR-09';
B. DROP FROM orders WHERE orderdate <'01-APR-09';
C. REMOVE FROM orders WHERE orderdate <'01-APR-09';
D. DELETE FROM orders

D. unlimited

How many rows can be added to a table by executing the INSERT INTO...VALUES command?
A. 1
B. 2
C. 3
D. unlimited

D. None of the above restores the deleted orders

You accidentally deleted all the orders in the ORDERS table. How can the error be corrected after a COMMIT command has been issued?
A. ROLLBACK;
B. ROLLBACK COMMIT;
C. REGENERATE RECORDS orders;
D. None of the above restores the deleted orders

D. .sql

Which of the following is the standard extension used for a script file?
A. .spt
B. .srt
C. .script
D. .sql

D. none of the above

A rollback occurs automatically when:
A. A DDL command is executed.
B. A DML command is executed.
C. The user exits the system
D. none of the above

D. unlimited

What is the maximum number of rows that can be deleted from a table at one time?
A. 1
B. 2
C. 3
D. unlimited

D. None of the above statements is correct.

Which of the following is a correct statement?
A. If you attempt to add a record that violates a constraint for one of the table's columns, only the valid columns for the row are added.
B. A subquery nested in the VALUES clause of an INSERT INTO command c

D. unlimited

What is the maximum number of records that can be modified with a single UPDATE command?
A. 1
B. 2
C. 3
D. unlimited