Suppose you learn, after you have created a table and added records to the table, that additional fields are required in the table. Discuss the differences between using the ALTER TABLE statement to add the new fields vs. dropping the table and using CREATE TABLE to create a new table with the correct fields.
What will be an ideal response?
Dropping a table deletes all of the data in the table. If you then use CREATE TABLE to re-create the table
with the new fields / columns , you will have to re-populate the table to add the data that was deleted when the original table
was dropped. With the ALTER TABLE statement, the new fields are added to the existing records in the database. Once the
new fields are populated in all existing records, any fields / columns that may no longer be needed could be deleted. Using
ALTER TABLE in this way preserves the data in the table and eliminates the task of re-populating the table.
You might also like to view...
A program that is purchased or licensed for a fee is a(n) ________ application
Fill in the blank(s) with correct word
Splunk extracts fields from event data at index time and at search time.
A. True B. False