RelationalDBDesign
RedhatLinuxSys Seomining
prev prev
Course navigation
Altering a table
Dropping columns from a table
If you want to drop a column from a table, you can by creating a new table using the following steps:
  1. Create another table with all of the columns you want to retain
  2. Transfer the data from the original table to the new table with the SQL statement INSERT…INTO FROM SELECT…
  3. Drop the original table
  4. Use the ALTER TABLE command to change the name of the new table to the name of the original table
Do not "COMMIT" this transaction until you successfully rename the new table, otherwise you will lose data.
Course navigation