Deck 6: Updating Data

Full screen (f)
exit full mode
Question
One of the nicest features of a relational DBMS,such as Oracle,is the ease with which you can change table structures.
Use Space or
up arrow
down arrow
to flip the card.
Question
You cannot commit and roll back data in SQL Server.
Question
The command,CREATE TABLE AS LEVEL1_CUSTOMER USING CUSTOMER;creates a table called LEVEL1_CUSTOMER that has the same structure as CUSTOMER.
Question
Updates become permanent automatically when you exit from the DBMS.
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
By default,Oracle commits each action query as soon as the user executes the query.
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
In SQL Server,the word NULL appears in the results when a column contains a null value.
Question
You can create a new table using data in an existing table.
Question
The data stored in tables changes only infrequently.
Question
When necessary,include a WHERE clause into the UPDATE command to indicate the column on which the change is to take place.
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
In a transaction,it is acceptable if some steps fail.
Question
You use the APPEND command to add additional rows to tables.
Question
If the Autocommit mode is turned off,you can cancel updates at any time during your current work session.
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
You can use REMOVE ROW to remove a row from a table.
Question
If you decrease the size of a column,it is possible to lose some data currently in the column.
Question
The DROP TABLE command creates an empty table.
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
To change rows for which a specific condition is true,use the ____ command​

A)CHANGE
B)​MODIFY
C)UPDATE
D)​ALTER
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
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
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 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
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
In Access,use the Documenter tool to show the layout of a table.
Question
You cannot change the characteristics of existing columns.
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 add a new column,use the ADD NEW COLUMN clause of the ALTER TABLE command.
Question
In SQL Server,execute the sp_columns command to list all the columns in a table.
Question
There are table structure changes that are beyond the capabilities of SQL.
Question
Access does not support the ____ data type.​

A)DECIMAL
B)​CURRENCY
C)CHAR
D)​INT
Question
In Oracle 11 g,a null value is displayed as a hyphen.
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
To permanently remove both a table and its data,you must issue both a DROP TABLE command and a DELETE command.
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
You use the ____________________ command to remove rows from a table.​
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
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
The ROLLBACK command reverses changes made to the ____________________ only.​
Question
Which of the following is a valid SQL command?​

A)COMMIT TABLE;
B)​COMMIT CHANGES;
C)COMMIT DB;
D)​COMMIT;
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
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.​
Question
During your current work session you can save your changes immediately by executing the ____________________ command.​
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
In Oracle,use the ____ command to display the structure of a table.​

A)SHOW TABLE
B)​SHOW LAYOUT
C)DESCRIBE
D)​DISPLAY LAYOUT
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
You can use the ____ command to delete an entire table and its data.​

A)ROLLBACK
B)​DELETE TABLE
C)DROP TABLE
D)​DELETE
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
Which of the following commands executes a rollback?​

A)ROLLBACK TABLE;
B)​ROLLBACK;
C)ROLLBACK ALL;
D)​ROLLBACK DB;
Question
A(n)____________________ is a logical unit of work.​
Question
To delete rows from the database,use the ____ command.​

A)ROLLBACK
B)​COMMIT
C)DELETE
D)​UPDATE
Question
The ____ command is permanent.​

A)SELECT
B)​COMMIT
C)SAVE
D)​UPDATE
Question
You can delete a table that is no longer needed by using the ____________________ 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
Describe the format of the ALTER TABLE command to add a new column.​
Question
You can change the characteristics of existing columns by using the ____________________ clause of the ALTER TABLE command.​
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
How can you use the COMMIT and ROLLBACK commands to support transactions?​
Question
In a transaction,if any update cannot be completed,execute the ____________________ command and discontinue the updates for the current transaction.​
Question
Before beginning the updates for a transaction,commit any previous updates by executing the ____________________ command.​
Question
The ADD clause consists of the word ADD followed by the name of the ____________________ to be added,followed by the characteristics.​
Question
In a transaction,if you can complete all updates successfully,execute the ____________________ command after completing the final update.​
Question
Describe the format for the UPDATE command.​
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
In Oracle,use the ____________________ command to display the structure of a table.​
Question
To add a new column,use the ____________________ clause of the ALTER TABLE command.​
Question
With SQL,you can change a table's structure by using the ____________________ 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
One of the nicest features of a relational DBMS,such as Oracle,is the ease with which you can change table structures.
True
2
You cannot commit and roll back data in SQL Server.
False
3
The command,CREATE TABLE AS LEVEL1_CUSTOMER USING CUSTOMER;creates a table called LEVEL1_CUSTOMER that has the same structure as CUSTOMER.
False
4
Updates become permanent automatically when you exit from the DBMS.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
5
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
6
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
7
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
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
You use the APPEND command to add additional rows to tables.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
17
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
18
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
19
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
20
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
21
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
22
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
23
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
24
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
25
____ 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
26
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
27
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
28
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
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.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
30
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
31
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
32
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
33
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
34
To add a new column,use the ADD NEW COLUMN clause of the ALTER TABLE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
35
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
36
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
37
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
38
In Oracle 11 g,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
39
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
40
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
41
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
42
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
43
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
44
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
45
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
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
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
48
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
49
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.​
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
50
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
51
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
52
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
53
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
54
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
55
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
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
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
58
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
59
To delete rows 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
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
61
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
62
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
63
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
64
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
65
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
66
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
67
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
68
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
69
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
70
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
71
Describe the format for the UPDATE command.​
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
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
74
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
75
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
locked card icon
Unlock Deck
Unlock for access to all 75 flashcards in this deck.