有时候insert into 后面的select的部分字段需要引用不是原始值,这种情况代码怎么写?见下述例子:

Insert into test(id,classid,keyid) select @id:={$newsid} as id,@classid:={$id} as classid,keyid from test where id = {$newoldid}

Related Posts: MySQL Insert into select引用部分值 :