View Full Version : MySQL Table Merging

10-23-2009, 04:47 AM
I am working on a system to provide remote updates to installations of my software. Basically, the remote installation will grab the update zip file from my server and copy appropriate files.

In certain cases, a database structure update may be required as well. What would be the best method to accomplish this? Ideally, all of the information contained within the database would be copied to the corresponding columns in the new table structure. The problem seems to lie in transferring table rows when a column no longer exists.

For example, in a system configuration table, the column "TestURL" is no longer needed, and is removed in the new table structure. When I export the original table data, this column exists, but when I try to import the data an error is thrown that the column does not exist.

Rather confusing to explain, I hope this makes sense to someone who has encountered and solved this before. Thanks!

10-23-2009, 02:54 PM
have you ever used insert select queries?