How to update all columns at once in ORACLE without highlighting the column name
2 answers
As far as I know, there is no way to update table column values without specifying the column name. Your goal is for table A to have the same values in table B, then you can delete all rows from table A and copy the data to table A.
delete from A;
insert into A select * from B;
commit;
If you have multiple reasons to use an operator update
and there are many columns, you can generate the statement update
using a dictionary.
select 'A.'||column_name||'=B.'||column_name||','
from all_tab_columns
where owner = 'your schema name'
and table_name = 'A';
You run the query and copy the result and edit.
update A
set <paste the result of previous query here>
;
+2
source to share