Complex Table Changes
Complex table structure changes usually require a manual move process involving these steps:
- Create a new table with the new column layout.
- Use INSERT SELECT statement to copy data from the old table to the new table.
- Verify that the new table contains the desired data.
- Rename the old table (or delete it if you are brave)
- Rename the new table with the name previously used by the old table.
- Recreate any triggers, stored procedures, indexes, and foreign keys as needed.
page revision: 0, last edited: 02 Nov 2008 07:44