mercredi 15 avril 2015

correct merge of 2 tables in SQLite

I have 2 tables with the same structure: |Word|Score|


Words is unique inside of each table. (But can be not unique for 2 tables)


I need to:




  1. Add data pair from second table to first if its unique for both tables(and absent in first table);




  2. update word score of first table if some pair "word/score" exist in second table (i mean: if both tables have word "standard", score is "5" for first table and "10" in second table, updated score of first table must be "15")




Aucun commentaire:

Enregistrer un commentaire