Updating multiple tables in pl sql Free phone sex no creditcard needed for
Secondly you have shown me to update table with "KEY PRESERVED" method. IT NEEDS THIS LOGICALLY regardless of the method used, so just add it (for if a row in OLD joins to more than one row in NEW -- you are hosed, you cannot update this data, therefore NEW has a unique/primary key, add it to facilitate the update) I had a similiar query and i tried applying to my tables. If it is not possible can you show me how to write "GOOD" sql ? i.e, one column of a table should get updated from another column of another table. works fine when I try to update all the records in tbl A, however, in this case I only have missing data which I have identified and populated in tbl B.
Thanks for being a member of the Ask TOM community. This year we've answered over 2800 of your questions and followed up on 3500 reviews. Hi Tom, Due to migration to new system we have to change all our account numbers. June 28, 2005 - pm UTC yes, the predicate in the join for the fictional question without a sample table and data was wrong (everytime I wing it, try to answer WITHOUT TESTING, it comes out wrong. test cases are relevant :) Hi Tom, Thanks for answering my question.
When the subquery fails to find a matching row in tbl B, the subquery returns NULL.
But since the UPDATE has no WHERE clause, it will update all rows, even those where the subquery returns NULL.
Consequently, to prevent this, you might do this: One potential issue may arise when the subquery actually finds more than one matching row in tbl B.
If this happens, the UPDATE will terminate with an error ("subquery may return only one row").