But, I wasn't worried about that for now 'cuz I used this for a one off script to correct bad data. Don't know what the pros and cons are between the two when it comes to performance. @a_horse_with_no_name: Oracle does not directly support the JOIN keyword in an UPDATE, but it allows UPDATE involving JOIN operations between table in at least 2 different ways, look at the accepted answer here: stackoverflow.com/questions/2446764/…
Cross table update (also known as correlated update, or multiple table update) in Oracle uses non-standard SQL syntax format (non ANSI standard) to update rows in another table. Update data in table A based on two or more common columns in table B.
The differences in syntax are quite dramatic compared to other database systems like MS SQL Server or My SQL. Updates based on two or more common columns are normally used for tables where multiple columns work together as a primary key (known as composite primary key).
So here's what I came up with: Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
T-SQL is designed to be set-based, so it works on entire sets of data as a whole; it should NOT be used to work on data line-by-line.
If your table t1 and it's backup t2 have many columns, here's a compact way to do it.I have one table A has column (id, field_1,field_2), and another table B has column (id,field_2) Now I want to merge table B to A, that means i want to update field_2 in table A to value of table B. BTW I am using oracle Thanks Now, each time the above is executed, it will do it across all rows in the table.If this is something you need to do all the time, I would suggest something else, but for a one-off or very small tables it should be sufficient.However in some cases specifying the partition name can be more efficient than a complicated Specify a complete or partial name of a database link to a remote database where the object is located.You can use a database link to update a remote object only if you are using Oracle Database distributed functionality.We are going to update column DESCRIPTION and PICTURE in table Categories_Test by using data in table Categories, based on data in the common column CATEGORY_ID. Update data in a column in table A based on a common column in table B. Update data in two columns in table A based on a common column in table B. Conditionally update data in table A based on a common column in table B. No portion may be reproduced without my written permission.