我设法从table_source
into克隆了一行table_temp
,并更新了它的字段f0
。
但是我怎样才能指向新插入的行呢?
我想将新插入的 id 从表中插入table_source
到以下字段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