insert into a(name,num,class) select '小米','1001',class from b where name = '小米'; 小米和1001可以当b表中不存在的字段却又要保存到a表时的写法;