Deck 6: Updating Data

Full screen (f)
exit full mode
Question
You cannot commit and roll back data in SQL Server.
Use Space or
up arrow
down arrow
to flip the card.
Question
You use the APPEND command to add additional rows to tables.
Question
Updates become permanent automatically when you exit from the DBMS.
Question
In SQL Server, the word NULL appears in the results when a column contains a null value.
Question
When necessary, include a WHERE clause into the UPDATE command to indicate the column on which the change is to take place.
Question
The command, CREATE TABLE AS LEVEL1_CUSTOMER FROM CUSTOMER; creates a table called LEVEL1_CUSTOMER that has the same structure as CUSTOMER.
Question
To verify that the correct change was made to data in a table, use the DISPLAY command.
Question
You cannot use a compound condition with an UPDATE command.
Question
If the Autocommit mode is turned off, you can cancel updates at any time during your current work session.
Question
Access does not support the COMMIT or ROLLBACK commands.
Question
You can use the existing value in a column and a calculation to update a value.
Question
If you change the value of a column to NULL, you must enclose the NULL value in single quotation marks.
Question
It is a good idea to use a SELECT command to display the data you changed to verify that the correct update was made.
Question
You can use REMOVE ROW to remove a row from a table.
Question
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.
Question
By default, Oracle commits each action query as soon as the user executes the query.
Question
The data stored in tables changes only infrequently.
Question
One of the nicest features of a relational DBMS, such as Oracle, is the ease with which you can change table structures.
Question
You can create a new table using data in an existing table.
Question
In a transaction, it is acceptable if some steps fail.
Question
In Access, use the Documenter tool to show the layout of a table.
Question
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.
Question
____ 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
Question
There are table structure changes that are beyond the capabilities of SQL.
Question
To add a new column, use the ADD COLUMN clause of the ALTER TABLE command.
Question
To add data from an existing table to a new table, use a SELECT command in a(n) ____ command.

A) SET
B) ADD
C) INSERT
D) UPDATE
Question
In Oracle 10g, a null value is displayed as a hyphen.
Question
When you add a new column to a table, the default for Oracle, SQL Server, and Access is to accept null values.
Question
You can increase the length of column but you cannot decrease the length of a column.
Question
Access does not support the ____ data type.

A) DECIMAL
B) CURRENCY
C) CHAR
D) INT
Question
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
Question
The DROP TABLE command creates an empty table.
Question
You cannot change the characteristics of existing columns.
Question
If you decrease the size of a column, it is possible to lose some data currently in the column.
Question
To permanently remove both a table and its data, you must issue both a DROP TABLE command and a DELETE command.
Question
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
Question
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
Question
In SQL Server, execute the sp_columns command to list all the columns in a table.
Question
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
Question
To change rows for which a specific condition is true, use the ____ command

A) CHANGE
B) MODIFY
C) UPDATE
D) ALTER
Question
In Oracle, use the ____ command to display the structure of a table.

A) SHOW TABLE
B) SHOW LAYOUT
C) DESCRIBE
D) DISPLAY LAYOUT
Question
Which of the following commands executes a rollback?

A) ROLLBACK TABLE;
B) ROLLBACK;
C) ROLLBACK ALL;
D) ROLLBACK DB;
Question
The UPDATE command contains the word ____________________, followed by the name of the column to be updated, an equals sign, and the new value.
Question
During your current work session you can save your changes immediately by executing the ____________________ command.
Question
The ____ command is permanent.

A) SELECT
B) COMMIT
C) SAVE
D) UPDATE
Question
The ROLLBACK command reverses changes made to the ____________________ only.
Question
A(n) ____ can be viewed as a sequence of steps that accomplishes a single task.

A) procedure
B) transaction
C) program
D) method
Question
You use the ____________________ command to remove rows from a table.
Question
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
Question
In SQL, use the ____ data type for variable-length character columns.

A) TEXT
B) VARCHAR
C) VARIABLE
D) CHARLENGTH
Question
To sort rows in a specific order, use the ____________________ clause with the desired sort key(s).
Question
Which of the following is a valid SQL command?

A) DROP TABLE LEVEL1_CUSTOMER;
B) DROP LEVEL1_CUSTOMER;
C) DELETE LEVEL1_CUSTOMER;
D) All of the above
Question
Which of the following is a valid SQL command?

A) COMMIT TABLE;
B) COMMIT CHANGES;
C) COMMIT DB;
D) COMMIT;
Question
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
Question
By placing a(n) ____________________ command in an INSERT command, you can add the query results to a table.
Question
What happens if you run a DELETE command that does not contain a WHERE clause?

A) The table will be deleted.
B) All rows will be deleted from the table.
C) All values would be replaced by nulls.
D) None of the above.
Question
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.
Question
You can use the ____ command to delete an entire table and its data.

A) ROLLBACK
B) DELETE TABLE
C) DROP TABLE
D) DELETE
Question
To delete data from the database, use the ____ command.

A) ROLLBACK
B) COMMIT
C) DELETE
D) UPDATE
Question
A(n) ____________________ is a logical unit of work.
Question
The ADD clause consists of the word ADD followed by the name of the ____________________ to be added, followed by the characteristics.
Question
Before beginning the updates for a transaction, commit any previous updates by executing the ____________________ command.
Question
Describe the format for the UPDATE command.
Question
With SQL, you can change a table's structure by using the ____________________ command.
Question
In a transaction, if any update cannot be completed, execute the ____________________ command and discontinue the updates for the current transaction.
Question
You can delete a table that is no longer needed by using the ____________________ TABLE command.
Question
In Oracle, use the ____________________ command to display the structure of a table.
Question
In a transaction, if you can complete all updates successfully, execute the ____________________ command after completing the final update.
Question
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.
Question
Describe the format of the ALTER TABLE command to add a new column.
Question
How can you use the COMMIT and ROLLBACK commands to support transactions?
Question
To change a column that currently rejects null values so that it accepts null vlaues, use the ____________________ clause in the ALTER TABLE command.
Question
To add a new column, use the ____________________ clause of the ALTER TABLE command.
Question
If you specified ____________________ for the column when you created the table, then changing a value in a column to null is prohibited.
Question
You can change the characteristics of existing columns by using the ____________________ clause of the ALTER TABLE command.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/75
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 6: Updating Data
1
You cannot commit and roll back data in SQL Server.
False
2
You use the APPEND command to add additional rows to tables.
False
3
Updates become permanent automatically when you exit from the DBMS.
True
4
In SQL Server, the word NULL appears in the results when a column contains a null value.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
5
When necessary, include a WHERE clause into the UPDATE command to indicate the column on which the change is to take place.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
6
The command, CREATE TABLE AS LEVEL1_CUSTOMER FROM CUSTOMER; creates a table called LEVEL1_CUSTOMER that has the same structure as CUSTOMER.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
7
To verify that the correct change was made to data in a table, use the DISPLAY command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
8
You cannot use a compound condition with an UPDATE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
9
If the Autocommit mode is turned off, you can cancel updates at any time during your current work session.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
10
Access does not support the COMMIT or ROLLBACK commands.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
11
You can use the existing value in a column and a calculation to update a value.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
12
If you change the value of a column to NULL, you must enclose the NULL value in single quotation marks.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
13
It is a good idea to use a SELECT command to display the data you changed to verify that the correct update was made.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
14
You can use REMOVE ROW to remove a row from a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
15
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.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
16
By default, Oracle commits each action query as soon as the user executes the query.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
17
The data stored in tables changes only infrequently.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
18
One of the nicest features of a relational DBMS, such as Oracle, is the ease with which you can change table structures.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
19
You can create a new table using data in an existing table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
20
In a transaction, it is acceptable if some steps fail.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
21
In Access, use the Documenter tool to show the layout of a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
22
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.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
23
____ 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
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
24
There are table structure changes that are beyond the capabilities of SQL.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
25
To add a new column, use the ADD COLUMN clause of the ALTER TABLE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
26
To add data from an existing table to a new table, use a SELECT command in a(n) ____ command.

A) SET
B) ADD
C) INSERT
D) UPDATE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
27
In Oracle 10g, a null value is displayed as a hyphen.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
28
When you add a new column to a table, the default for Oracle, SQL Server, and Access is to accept null values.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
29
You can increase the length of column but you cannot decrease the length of a column.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
30
Access does not support the ____ data type.

A) DECIMAL
B) CURRENCY
C) CHAR
D) INT
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
31
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
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
32
The DROP TABLE command creates an empty table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
33
You cannot change the characteristics of existing columns.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
34
If you decrease the size of a column, it is possible to lose some data currently in the column.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
35
To permanently remove both a table and its data, you must issue both a DROP TABLE command and a DELETE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
36
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
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
37
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
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
38
In SQL Server, execute the sp_columns command to list all the columns in a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
39
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
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
40
To change rows for which a specific condition is true, use the ____ command

A) CHANGE
B) MODIFY
C) UPDATE
D) ALTER
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
41
In Oracle, use the ____ command to display the structure of a table.

A) SHOW TABLE
B) SHOW LAYOUT
C) DESCRIBE
D) DISPLAY LAYOUT
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
42
Which of the following commands executes a rollback?

A) ROLLBACK TABLE;
B) ROLLBACK;
C) ROLLBACK ALL;
D) ROLLBACK DB;
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
43
The UPDATE command contains the word ____________________, followed by the name of the column to be updated, an equals sign, and the new value.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
44
During your current work session you can save your changes immediately by executing the ____________________ command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
45
The ____ command is permanent.

A) SELECT
B) COMMIT
C) SAVE
D) UPDATE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
46
The ROLLBACK command reverses changes made to the ____________________ only.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
47
A(n) ____ can be viewed as a sequence of steps that accomplishes a single task.

A) procedure
B) transaction
C) program
D) method
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
48
You use the ____________________ command to remove rows from a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
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
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
50
In SQL, use the ____ data type for variable-length character columns.

A) TEXT
B) VARCHAR
C) VARIABLE
D) CHARLENGTH
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
51
To sort rows in a specific order, use the ____________________ clause with the desired sort key(s).
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
52
Which of the following is a valid SQL command?

A) DROP TABLE LEVEL1_CUSTOMER;
B) DROP LEVEL1_CUSTOMER;
C) DELETE LEVEL1_CUSTOMER;
D) All of the above
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
53
Which of the following is a valid SQL command?

A) COMMIT TABLE;
B) COMMIT CHANGES;
C) COMMIT DB;
D) COMMIT;
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
54
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
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
55
By placing a(n) ____________________ command in an INSERT command, you can add the query results to a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
56
What happens if you run a DELETE command that does not contain a WHERE clause?

A) The table will be deleted.
B) All rows will be deleted from the table.
C) All values would be replaced by nulls.
D) None of the above.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
57
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.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
58
You can use the ____ command to delete an entire table and its data.

A) ROLLBACK
B) DELETE TABLE
C) DROP TABLE
D) DELETE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
59
To delete data from the database, use the ____ command.

A) ROLLBACK
B) COMMIT
C) DELETE
D) UPDATE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
60
A(n) ____________________ is a logical unit of work.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
61
The ADD clause consists of the word ADD followed by the name of the ____________________ to be added, followed by the characteristics.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
62
Before beginning the updates for a transaction, commit any previous updates by executing the ____________________ command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
63
Describe the format for the UPDATE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
64
With SQL, you can change a table's structure by using the ____________________ command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
65
In a transaction, if any update cannot be completed, execute the ____________________ command and discontinue the updates for the current transaction.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
66
You can delete a table that is no longer needed by using the ____________________ TABLE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
67
In Oracle, use the ____________________ command to display the structure of a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
68
In a transaction, if you can complete all updates successfully, execute the ____________________ command after completing the final update.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
69
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.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
70
Describe the format of the ALTER TABLE command to add a new column.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
71
How can you use the COMMIT and ROLLBACK commands to support transactions?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
72
To change a column that currently rejects null values so that it accepts null vlaues, use the ____________________ clause in the ALTER TABLE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
73
To add a new column, use the ____________________ clause of the ALTER TABLE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
74
If you specified ____________________ for the column when you created the table, then changing a value in a column to null is prohibited.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
75
You can change the characteristics of existing columns by using the ____________________ clause of the ALTER TABLE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 75 flashcards in this deck.