in reply to Re: Re: OT: MySQL combine 2 tables data when Perl 'fails'
in thread OT: MySQL combine 2 tables data when Perl 'fails'

Just use a temporary table
create table d SELECT tok, count FROM a UNION ALL SELECT tok, count FROM b; insert into c select tok, sum(count) as count from d group by tok; drop table d;

--

flounder