duminică, 2 mai 2010

Test: Quiz: Modifying a Table

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 1
1. To completely get rid of a table, its contents, its structure, AND release the storage space the keyword is: Mark for Review
(1) Points
DROP (*)
DELETE
TRUNCATE
KILL
Correct Correct
2. The following code creates a table named student_table with four columns: id, lname, fname, lunch_num

CREATE TABLE student_table
(id NUMBER(6),
lname VARCHAR(20),
fname VARCHAR(20),
lunch_num NUMBER(4));

The lunch_num column in the above table has been marked as UNUSED. Which of the following is the best statement you can use if you wish to remove the UNUSED column from the student_table?

Mark for Review
(1) Points
DROP column
ALTER TABLE DELETE UNUSED COLUMNS
ALTER TABLE DROP UNUSED COLUMNS (*)
ALTER TABLE DELETE ALL COLUMNS
CorrectCorrect
3. You can use DROP COLUMN to drop all columns in a table, leaving a table structure with no columns. True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct
4. Which of the following will correctly change the name of the LOCATIONS table to NEW_LOCATIONS? Mark for Review
(1) Points
ALTER TABLE LOCATIONS RENAME NEW_LOCATIONS
MODIFY TABLE LOCATIONS RENAME NEW_LOCATIONS
RENAME LOCATIONS TO NEW_LOCATIONS (*)
None of the above; you cannot rename a table, you can only CREATE, ALTER and DROP a table.
Correct Correct
5. When should you use the SET UNUSED command? Mark for Review
(1) Points
Never, there is no SET UNUSED command
You should use it if you think the column may be needed again later
You should use it when the system is being heavily used (*)
You should only use this command if you want the column to still be visible when you DESCRIBE the table
Correct Correct
6. Comments can be added to a table by using the COMMENT ON TABLE statement. The comments being added are enclosed in: Mark for Review
(1) Points
Double quotes " "
Single quotes ' ' (*)
Parentheses ( )
Brackets { }
Correct Correct
7. You can use the ALTER TABLE statement to: Mark for Review
(1) Points
Add a new column
Modify an existing column
Drop a column
All of the above (*)
Correct Correct
8. When you use ALTER TABLE to add a column, the new column: Mark for Review
(1) Points
Becomes the first column in the table
Becomes the last column in the table (*)
Can be placed by adding a GROUP BY clause
Will not be created because you cannot add a column after the table is created
Correct Correct
9. ALTER TABLE table_name RENAME can be used to: Mark for Review
(1) Points
Rename a row.
Rename a column.
Rename a table. (*)
All of the above.
10.
The FLASHBACK TABLE to BEFORE DROP can restore only the table structure, but not its data back to before the table was dropped.  True or False?
Mark for Review
(1) Points
11. After issuing a SET UNUSED command on a column, another column with the same name can be added using an ALTER TABLE statement. True or False? Mark for Review
(1) Points
True (*)
False
Correct Correct
12. The FLASHBACK QUERY statement can restore data back to a point in time before the last COMMIT. True or False?Mark for Review
(1) Points
True
False (*)
13. A columnメs data type can always be changed from NUMBER to VARCHAR2 but not from VARCHAR2 to NUMBER, provided the table is empty. True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct
14. The data type of a column can never be changed once it has been created. True or False? Mark for Review
(1) Points
True
False (*)
Correct Correct



( Vrei sa traduci ceva?Want to translate something? http://translate.google.ro/# )

Niciun comentariu:

Trimiteți un comentariu