MySQL Forums
Forum List  »  Newbie

Need trick for Import Big Database with some Differents Columns
Posted by: Pierre-Julien AVRIL
Date: December 21, 2014 09:43AM

Hello, i have a big database to transfert into another one, the problem is some columns was added in the source database who i don't want to the new database.

For exemple my new table `table_name` has only 3 colums whereas my source table has 4 columns.

When i do :
--
DELETE FROM `table_name`;
INSERT INTO `table_name` (`column_1`, `column_2`, `column_3`, `column_4`)
VALUES
('text 1','text 2','text 3','text 4');
--

I get :
---
Unknown column 'column_4' in 'field list'
---


There is a way to ignore table if not exist ?
(Without delete all reference for all the table don't exist anymore in the new database ?) Because i have a lot of table with a lot of column who don't exist and i don't want.


Thank you for your lights !!

Options: ReplyQuote


Subject
Written By
Posted
Need trick for Import Big Database with some Differents Columns
December 21, 2014 09:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.