In: Computer Science
QUESTION 1
Which of the following will correctly change the name of the LOCATIONS table to NEW_LOCATIONS?
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. |
1 points
QUESTION 2
The data type of a column can never be changed once it has been created.
True
False
1 points
QUESTION 3
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?
DROP column |
||
ALTER TABLE DELETE UNUSED COLUMNS |
||
ALTER TABLE DROP UNUSED COLUMNS |
||
ALTER TABLE DELETE ALL COLUMNS |
1 points
QUESTION 4
After issuing a SET UNUSED command on a column, another column with the same name can be added using an ALTER TABLE statement.
True
False
1 points
QUESTION 5
Comments can be added to a table by using the COMMENT ON TABLE statement. The comments being added are enclosed in:
Double quotes " " |
||
Single quotes ' ' |
||
Parentheses ( ) |
||
Brackets { } |
1 points
QUESTION 6
You can use the ALTER TABLE statement to:
Add a new column |
||
Modify an existing column |
||
Drop a column |
||
All of the above |
1 points
QUESTION 7
ALTER TABLE table_name RENAME can be used to:
Rename a row |
||
Rename a column |
||
Rename a table |
||
All of the above |
1 points
QUESTION 8
To completely get rid of a table, its contents, its structure, AND release the storage space the keyword is:
DROP |
||
DELETE |
||
TRUNCATE |
||
KILL |
1 points
QUESTION 9
When should you use the SET UNUSED command?
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 |
1 points
QUESTION 10
You can use DROP COLUMN to drop all columns in a table, leaving a table structure with no columns.
True
False