欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

mysql 从一个表中查询,插入到另一个表中

程序员文章站 2022-06-27 17:02:25
insert into table1(field1) select field1 from table2; insert into table1(field1) select field1 from table2 WHERE id > 3 and id <= 10; ......
insert into table1(field1) select field1 from table2; 

 

insert into table1(field1) select field1 from table2 where id > 3 and id <= 10;