Updating multiple columns in oracle
Below is the basic syntax for the UPDATE statement: This is not the complete syntax of the update statement.If you want to review the complete syntax of the UPDATE statement then please refer to Books Online.These two different tables will be used in my UDPATE statement examples below.
UPDATE some_table SET column_x = CASE WHEN x_specific_condition THEN new_value_for_x ELSE column_x END, column_y = CASE WHEN y_specific_condition THEN new_value_for_y ELSE column_y END, WHERE some_more_conditions Problem with above is, each column (x, y) still gets updated with their own value if some_more_conditions return true irrespective of their specific conditions returning true.
SQL courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.
Compared to traditional travel-based training, SQL saves time and valuable corporate resources, allowing companies to do more with less.
I wish to update the columns of a particular record in a table with values from another table.
There would be 5 columns needing their values updated.