Add MYSQL dump to table

I get two different dumps from two databases. All I have to do is add dump to one table, is this possible in mysql ..?

ex: - consider two sql files, first.sql file, second.sql file.

First.sql file has

name date name1 2013-06-01 name2 2013-06-01 

The second.sql file has

 name date name3 2013-06-01 name4 2013-06-01 

I would need to add them to one table.

Final table

 name date name1 2013-06-01 name2 2013-06-01 name3 2013-06-01 name4 2013-06-01 

dump recovery cuts load

I would like to add data to each sql recovery command.

+4
source share
2 answers

The .sql file is a script, you can edit it to delete the part in which it creates / deletes the table.

If you use mysqldump, you can add the --skip-add-drop-table and --no-create-info options --skip-add-drop-table that the drop / create table instructions are not displayed first

Further information can be found on the mysqldump documentation page.

+7
source

Thanks Guillaume for showing the trick.

use mysqldump --skip-add-drop-table --no-create-info -u pentah_user -p test outtestactivity> outtestactivity1.sql

0
source

Source: https://habr.com/ru/post/1489028/


All Articles