Oracle SQL: how do you duplicate a row and modify some of the values in a statement? there's around 50 columns
I was thinking of copying a row into a temp table modify the values in the temp table insert into existing table
But I was wondering if there's a better way
You just use insert . . . select:
insert . . . select
insert into t (col1, col2, col3, . . .) select col1, <whatever expression you want>, col3, . . . from t where . . . ;
2.1m questions
2.1m answers
60 comments
57.0k users