I am getting two different dumps from two databases , All i need to do is , i need to append dump in to a single 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
second.sql file has
name date
name3 2013-06-01
name4 2013-06-01
i would have to append them in a single table .
Final table
name date
name1 2013-06-01
name2 2013-06-01
name3 2013-06-01
name4 2013-06-01
dump restore does truncate load
, i would like to append data at each sql restore command .
With the utility, you can dump tables, one or several databases, or the entire server with all databases and tables along with their objects or migrate them to another server. In addition, the mysqldump utility can output the dump to the CSV or XML file formats.
The .sql file is a script, you can edit it, and remove the part where it creates/drops the table.
If you're using mysqldump
, you can add the --skip-add-drop-table
and --no-create-info
options so the drop/create table instructions won't be there in the first place
You can find more info on the mysqldump
documentation page
mysqldump --skip-add-drop-table --no-create-info -u pentah_user -p test outtestactivity > outtestactivity1.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With