语句
UPDATE table1 a ,table2 b SET a.type_id = b.type_id WHERE a.`name` = b.type
例子
UPDATE birds_complete a ,birds_type b SET a.type_id = b.type_id WHERE a.`name` = b.type
数据库A,B查询到的数据插入到C表中
insert into C (a_id, b_id)
select A.id, B.id
from A, B
order by B.id