I don’t have access, right now, to test this, but is the following — or something like it, as my off-the-top-of-my-head code mightn’t be perfect! — possible in Oracle:
declare
myRecord myTable%ROWTYPE;
begin
select * into myRecord from myTable where key = 123;
myRecord.key := 456;
myRecord.value := myRecord.value + 50;
insert into myTable select * from table(myRecord);
end;
i.e., We copy the record from myTable — which may have, say, 100 fields — with key 123 into a variable with the same schema, then update a few of the copied record’s fields (e.g., here, a new key and an updated value) before inserting it back into the original table: Effectively, duplicating the original record with some modifications, where necessary?
I know there are other ways to do this, but this seems quite neat, in comparison to what else I’ve seen…if it were to work, of course!
Some good examples on this site: http://psoug.org/reference/insert.html I guess you don’t want to do something like this because you have a lot of columns?