MySQL/PhpMyAdmin copy table with different columns -


If someone can help please think I'm sure I did it before but I do not remember!

I have two tables

database.users - old database. Site_users - new

Both have matching columns but more custom in the old table Columns that are no longer used.

Can I copy the user from the old database to the new database, but to ensure that only the column that still exists?

At the moment I get the load of errors about the counting of columns etc.

Thank you for anyone helping you :)

I just Will be commented, but I can not do it yet

To do this, I think you'll need it either:
1. Make sure you have the same columns on both tables, make the transfer and then delete the unnecessary columns on the new table.
2. Write a script or query that selects all the data from the old table and inserts it into the new table in the required format.
3. Export the data, change the required change

Edit: Here is the answer

Using it:

  INFL; INSERT SELECT id, col1, col3 in Biffu1 (ID, Cole 11, Cole 3);  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -