INSERT INTO student(id,xuesheng,yuwen,shuxue,yingyu) SELECT id,xuesheng,yuwen,shuxue,yingyu FROM stu;
实践:
insert into store_advertisings(id,title,PicListJson,edittime) (select s.Id,s.`Name` as name , ‘[]‘,NOW() from stores s left join store_advertisings d on s.Id= d.Id where d.Id is null)
原文地址:https://www.cnblogs.com/dayang12525/p/12059611.html
时间: 2024-10-24 03:51:37