Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > repair table mytablename;
- > truncate table temptable;
- > truncate table importtable;
- > #bulk insert new data
- > insert into importtable(col1,col2,col3)
- > values(1,2,3),(4,5,6),(7,8,9);
- > #now archive the live data
- > insert into temptable(col1,col2,col3)
- > select col1,col2,col3 from livetable;
- > #finally copy the new data to live
- > truncate table livetable;
- > insert into livetable(col1,col2,col3)
- > select col1,col2,col3 from importtable;
Add Comment
Please, Sign In to add comment