MySQL insert into select

INSERT INTO tb1 (a,b,c) select a1,b1,c1, from tb2 where ....

注,如需要插入其他字段为固定值,可以这样写

INSERT INTO tb1 (a,b,c,d,e) select a1,b1,c1, "d","e"from tb2 where ....

注:本人为HTML5开发,并非专业的后端开发,如有错误,请见谅

你可能感兴趣的:(MySQL insert into select)