Updating multiple tables in pl sql

After each exercise, we provide the solution so you can check your answer.

I can't load the relation data directly into product.

thanks Helen" id="ctl00_m_m_i_ctl00_gr_ctl11_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="5190984" / I use this method: update a,b set a.col5=-1,a.col7=b.col7, a.col8 = b.col8 where a.col1 =b.col1 and a.col2=b.col2 it works much faster then using "exists" if there are indexes on link columns.

Experts, I wanted to join two tables and update a single column as -1 This statement is giving errors.

update tab a set col1 = -1 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 Can anyone throw some light on this? I looks like it should be something like this: update a set col1 = -1 from tab a, tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col4 = b.col4 HTH, Ananthram" id="ctl00_m_m_i_ctl00_gr_ctl01_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="5190317" / update tab a set col1 = -1 where exists (select 1 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 ) Method 2: update tab a set (col1,col7,col8) = (select -1, col7,col8 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 ) where exists (select 1 from tab b where a.col2 = b.col2 and a.col3 = b.col3 and a.col3 = b.col4 ) Note: In Method 2 the sub-query must return only 1 row.

The update query below shows that the PICTURE column is updated by looking up the same ID value in CATEGORY_ID column in table Categories_Test and Categories. If you need to update multiple columns simultaneously, use comma to separate each column after the SET keyword. Here we only want to update PICTURE column in Categories_Test table where the data in Category_Name column is Seafood in table Categories. Software and hardware names mentioned on this site are registered trademarks of their respective companies.

Should any right be infringed, it is totally unintentional.

Search for updating multiple tables in pl sql:

updating multiple tables in pl sql-35updating multiple tables in pl sql-61updating multiple tables in pl sql-79

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating multiple tables in pl sql”