Guide To SQL 9th Edition Pratt Test Bank Download
Guide To SQL 9th Edition Pratt Test Bank Download
2. The command, CREATE TABLE AS LEVEL1_CUSTOMER USING CUSTOMER; creates a table called
LEVEL1_CUSTOMER that has the same structure as CUSTOMER.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 168
4. It is a good idea to use a SELECT command to display the data you changed to verify that the correct update was made.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 170
5. When necessary, include a WHERE clause into the UPDATE command to indicate the column on which the change is
to take place.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 170
6. To verify that the correct change was made to data in a table, use the DISPLAY command.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 170
8. You can use the existing value in a column and a calculation to update a value.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 170
10. By default, Oracle commits each action query as soon as the user executes the query.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 173
12. If the Autocommit mode is turned off, you can cancel updates at any time during your current work session.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 173
13. Updates become permanent automatically when you exit from the DBMS.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 173
15. You cannot commit and roll back data in SQL Server.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 173
16. You can use REMOVE ROW to remove a row from a table.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 175
17. If you specify NOT NULL for a column when you create a table, you are prohibited from changing a value in the
column to null.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 177
18. If you change the value of a column to NULL, you must enclose the NULL value in single quotation marks.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 178
19. One of the nicest features of a relational DBMS, such as Oracle, is the ease with which you can change table
structures.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 179
20. In SQL Server, the word NULL appears in the results when a column contains a null value.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 179
22. To add a new column, use the ADD NEW COLUMN clause of the ALTER TABLE command.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 179
23. When you add a new column to a table, the default for Oracle, SQL Server, and Access is to accept null values.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 180
REFERENCES: 183
25. In Access, use the Documenter tool to show the layout of a table.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 182
26. In SQL Server, execute the sp_columns command to list all the columns in a table.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 182
27. If you decrease the size of a column, it is possible to lose some data currently in the column.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 183
28. You can increase the length of column but you cannot decrease the length of a column.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 183
29. In some cases, you might need to change a table’s structure in ways that are beyond the capabilities of your DBMS.
When that happens, use the RESTRUCTURE command to redesign the table.
a. True
b. False
ANSWER: False
POINTS: 1
REFERENCES: 185
30. There are table structure changes that are beyond the capabilities of SQL.
a. True
b. False
ANSWER: True
POINTS: 1
REFERENCES: 185
34. You can use the ____ command to create a new table using data in an existing table.
a. CREATE TABLE
b. NEW TABLE
c. UPDATE
d. ALTER TABLE
ANSWER: a
POINTS: 1
REFERENCES: 168
35. To change rows for which a specific condition is true, use the ____ command
a. CHANGE
b. MODIFY
c. UPDATE
d. ALTER
ANSWER: c
POINTS: 1
REFERENCES: 169
36. To add data from an existing table to a new table, use a SELECT command in a(n) ____ command.
a. SET
b. ADD
Cengage Learning Testing, Powered by Cognero Page 6
Chapter 6: Updating Data
c. INSERT
d. UPDATE
ANSWER: c
POINTS: 1
REFERENCES: 168
37. If you have verified that the update you made is correct, you can use the ____ command to make the update
permanent.
a. UPDATE
b. ROLL
c. COMMIT
d. SAVE
ANSWER: c
POINTS: 1
REFERENCES: 173
38. If you have not run the COMMIT command, executing the ____ command will reverse all updates made during the
current work session.
a. UPDATE
b. REVERSE
c. ROLLBACK
d. ROLL
ANSWER: c
POINTS: 1
REFERENCES: 173
39. In order to use the COMMIT command in Oracle, you need to clear the check mark from the ____ check box.
a. Transaction
b. Autocommit
c. Permanent
d. Temporary
ANSWER: b
POINTS: 1
REFERENCES: 173
40. ____ is the default transaction mode in Oracle and commits each action query as soon as the user executes the query.
a. Execute
b. Run
c. Autocommit
d. Enabled
ANSWER: c
POINTS: 1
REFERENCES: 173
a. ROLLBACK TABLE;
b. ROLLBACK;
c. ROLLBACK ALL;
d. ROLLBACK DB;
ANSWER: b
POINTS: 1
REFERENCES: 173
44. A(n) ____ can be viewed as a sequence of steps that accomplishes a single task.
a. procedure
b. transaction
c. program
d. method
ANSWER: b
POINTS: 1
REFERENCES: 173
45. To delete rows from the database, use the ____ command.
a. ROLLBACK
b. COMMIT
c. DELETE
d. UPDATE
ANSWER: c
POINTS: 1
REFERENCES: 173
46. What happens if you run a DELETE command that does not contain a WHERE clause?
Cengage Learning Testing, Powered by Cognero Page 8
Chapter 6: Updating Data
47. If you specified ____ for a column when you created a table, then changing a value in a column to null is prohibited.
a. NOT NULL
b. NULL
c. CHAR
d. NUMBER
ANSWER: a
POINTS: 1
REFERENCES: 173
48. In Oracle, use the ____ command to display the structure of a table.
a. SHOW TABLE
b. SHOW LAYOUT
c. DESCRIBE
d. DISPLAY LAYOUT
ANSWER: c
POINTS: 1
REFERENCES: 185
49. You can use the ____ clause of the ALTER TABLE command to change a column that currently rejects null values so
that it will accept null values.
a. ADD
b. MODIFY
c. UPDATE
d. NULL
ANSWER: b
POINTS: 1
REFERENCES: 185
50. In SQL, use the ____ data type for variable-length character columns.
a. TEXT
b. VARCHAR
c. VARIABLE
d. CHARLENGTH
ANSWER: b
POINTS: 1
REFERENCES: 185
53. By placing a(n) ____________________ command in an INSERT command, you can add the query results to a table.
ANSWER: SELECT
POINTS: 1
REFERENCES: 168
54. The format for the UPDATE command is the word UPDATE, followed by the name of the table to be updated. The
next portion of the command consists of the word ____________________, followed by the name of the column to be
updated, an equals sign, and the new value.
ANSWER: SET
POINTS: 1
REFERENCES: 170
55. During your current work session you can save your changes immediately by executing the ____________________
command.
ANSWER: COMMIT
POINTS: 1
REFERENCES: 173
56. If you decide that you do not want to save the changes you have made during your current work session, you can
reverse the changes by executing the ____________________ command.
ANSWER: ROLLBACK
POINTS: 1
REFERENCES: 173
57. The ROLLBACK command reverses changes made to the ____________________ only.
ANSWER: data
POINTS: 1
REFERENCES: 173
Cengage Learning Testing, Powered by Cognero Page 10
Chapter 6: Updating Data
58. To sort rows in a specific order, use the ____________________ clause with the desired sort key(s).
ANSWER: ORDER BY
POINTS: 1
REFERENCES: 172
59. You use the ____________________ command to remove rows from a table.
ANSWER: DELETE
POINTS: 1
REFERENCES: 174
61. Before beginning the updates for a transaction, commit any previous updates by executing the
____________________ command.
ANSWER: COMMIT
POINTS: 1
REFERENCES: 174
62. In a transaction, if any update cannot be completed, execute the ____________________ command and discontinue
the updates for the current transaction.
ANSWER: ROLLBACK
POINTS: 1
REFERENCES: 174
63. In a transaction, if you can complete all updates successfully, execute the ____________________ command after
completing the final update.
ANSWER: COMMIT
POINTS: 1
REFERENCES: 174
64. If you specified ____________________ for the column when you created the table, then changing a value in a
column to null is prohibited.
ANSWER: NOT NULL
POINTS: 1
REFERENCES: 177
65. With SQL, you can change a table’s structure by using the ____________________ command.
ANSWER: ALTER TABLE
POINTS: 1
REFERENCES: 179
66. To add a new column, use the ____________________ clause of the ALTER TABLE command.
ANSWER: ADD
Cengage Learning Testing, Powered by Cognero Page 11
Chapter 6: Updating Data
POINTS: 1
REFERENCES: 179
67. The ADD clause consists of the word ADD followed by the name of the ____________________ to be added,
followed by the characteristics.
ANSWER: column
POINTS: 1
REFERENCES: 179
68. The format for the ALTER TABLE command is the words ALTER TABLE followed by the name of the
____________________ to be altered, followed by an appropriate clause.
ANSWER: table
POINTS: 1
REFERENCES: 179
69. In Oracle, use the ____________________ command to display the structure of a table.
ANSWER: DESCRIBE
POINTS: 1
REFERENCES: 182
70. You can change the characteristics of existing columns by using the ____________________ clause of the ALTER
TABLE command.
ANSWER: MODIFY
POINTS: 1
REFERENCES: 183
71. To change a column that currently rejects null values so that it accepts null vlaues, use the ____________________
clause in the ALTER TABLE command.
ANSWER: MODIFY
POINTS: 1
REFERENCES: 185
72. You can delete a table that is no longer needed by using the ____________________ TABLE command.
ANSWER: DROP
POINTS: 1
REFERENCES: 185
74. How can you use the COMMIT and ROLLBACK commands to support transactions?
ANSWER: You can use the COMMIT and ROLLBACK commands to support transactions as follows:
Before beginning the updates for a transaction, commit any previous updates by executing the
COMMIT command.
Complete the updates for the transaction. If any update cannot be completed, execute the ROLLBACK
command and discontinue the updates for the current transaction.
If you can complete all updates successfully, execute the COMMIT command after completing the final
update.
POINTS: 1
REFERENCES: 174
75. Describe the format of the ALTER TABLE command to add a new column.
ANSWER: To add a new column, use the ADD clause of the ALTER TABLE command. The format for the
command is the words ALTER TABLE followed by the name of the table to be altered, followed by an
appropriate clause. The ADD clause consists of the word ADD followed by the name of the column to
be added, followed by the characteristics of the column.
POINTS: 1
REFERENCES: 179