Updating multiple columns in oracle

You may wish to update records in one table based on values in another table.

Since you can't list more than one table in the Oracle UPDATE statement, you can use the Oracle EXISTS clause.

Hi Everyone how should i update multiple columns of a table from another table...

Suppose I have table A and B and having four columns each table A(col1,col2,col3,col4) B(col1,col2,col3,col4) then how should i do something like this update A set(col2,col4)=(select B.col2, B.col4 from B where B.col1=A.col1 and A.col3=A.col3) Please help..........

To modify a column of a table, you need to specify the column name, table name, and action that you want to perform.

Every major database system, whether proprietary or open source, has a manual which you can browse for free on the Web.Read an example of an SQL case expression from our SQL expert Rudy Limeback.Continue Reading Read SQL expert Rudy Limeback's advice for counting combinations in a table with SQL's GROUP BY clause Continue Reading Read about the Mimer Validator, a tool used to verify your SQL code, in this tip from SQL expert Rudy Limeback.All current rows in the table now contain NULLs for the new columns.I added each column separately, but you can add as many columns as needed in one command by separating them with commas.

Leave a Reply