一、表结构一样

insert into 表1 select * from 表2

二、 表结构不一样或者取部分列

insert into 表1 (列名1,列名2,列名3) select 列1,列2,列3 from 表2
insert into 表1 (列名1,列名2,列名3) values(列1,列2,(select 列3 from 表2));
insert into table_class (id,name,created,updated) select code,name,now(),now() from `t_dict` where name = 'table_category';

相关文章:

  • 2022-12-23
  • 2021-12-15
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
相关资源
相似解决方案