一、复制表里面的一条记录并插入表里面

insert into reyo(title,keywords,desc,contents) select
title,keywords,desc,contents from reyo where reyo_id = 100;

二、复制表里的多条数据/记录,并插入到表里面

INSERT INTO `reyo`(title,type,status) SELECT title,type,status FROM reyo WHERE id < 5;

INSERT into reyo (num,overtime) SELECT num,overtime from reyo where id IN(1,3,5,6,7,9);

三、在创建表时,就插入另一张表里面的某些数据

create table reyo AS select * from member where id < 10


相关文章:

  • 2021-05-30
  • 2022-12-23
  • 2022-01-04
  • 2021-09-22
  • 2022-12-23
  • 2022-02-26
  • 2021-08-31
  • 2022-12-23
猜你喜欢
  • 2022-01-09
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
相关资源
相似解决方案