INSERT INTO all_tok (tok, tok1.count+tok2.count) SELECT tok, count from tok1 UNION SELECT tok, count from tok2