我设法将table_source
的一行克隆到table_temp
,
并更新其字段f0
。
但是如何指向新插入的行?
我想将表table_source
中的新插入ID插入f_id
中的字段table2
:
INSERT into table_temp (f0, f1, f2)
select f0, f1, f2 from table_source
where . . .
UPDATE table_temp SET f0 = 'newValue'
INSERT INTO table_source select * from table_temp
UPDATE table2 SET f_id = ??? WHERE . . . <- what id can I use here?
DELETE FROM table_temp