有时候insert into 后面的select的部分字段需要引用不是原始值,这种情况代码怎么写?见下述例子:
Insert into test(id,classid,keyid) select @id:={$newsid} as id,@classid:={$id} as classid,keyid from test where id = {$newoldid}
未经允许不得转载:阿藏博客 » MySQL Insert into select引用部分值
有时候insert into 后面的select的部分字段需要引用不是原始值,这种情况代码怎么写?见下述例子:
Insert into test(id,classid,keyid) select @id:={$newsid} as id,@classid:={$id} as classid,keyid from test where id = {$newoldid}
未经允许不得转载:阿藏博客 » MySQL Insert into select引用部分值