sql - How to restore differential mysql dump -


i have database named "testing". have restore data new dump file having old + new data "testing" database. want restore new data database (without duplicating old data ) .

tried taking backup of portion of table , restoring ( how use mysqldump portion of table?), did't work out because no column id in table (primary key row count )

my table structure ,

              | b          | c       | d     | e       | +---------------+------------+---------+-------+---------+ | 1432550740000 |     111004 | 10000   |     2 | 9690001 | | 1432550790000 |     123001 | 10000   |     2 | 9690001 | | 1432550340000 |   44440215 | 10000   |     2 | 9690001 | | 1432550450000 |  125400054 | 10000   |     2 | 9690001 | | 1432551444000 |   43459067 | 10000   |     2 | 9690001 | +---------------+------------+---------+-------+---------+ 

can please guide me ?

you can take little detour creating new table (same structure old one) , dump data of old , new data one.

you can delete rows new data exist in other table. (ideally have in data identify new values, work limit if write query yourself)

delete newtable `identifier` in (select `identifier` oldtable); delete newtable limit 12; -- deletes first 12 entries 

now have new data in new table. can truncate old table , insert new data old table.

truncate oldtable; insert oldtable select * newtable; 

and can truncate, empty or delete newtable, don't need anymore.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -