Simple update statement (or is it?)

From: Sashi <smalladi_at_gmail.com>
Date: Thu, 11 Feb 2010 11:27:42 -0800 (PST)
Message-ID: <4a67ee63-5626-45e0-aea8-33a9efd0312c_at_m16g2000yqc.googlegroups.com>



I have a very simple update statement. My version is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

Update A
set A.col3 = (select col3 from B where B.col1 = A.col1 and B.col2 = A.col2)
where a.col3 is null;

When the statement runs, it confirms that 291 rows have been updated.

However, when I run select count(*) from A where col3 is null, I get the result as 648 before AND after running the above update. And, yes, I'm issuing a commit after the update statement.

I'm left scratching my head.

Is there something wrong with my update statement? I looked up some examples and psoug.org has some that match my syntax above.

Thanks for any pointers!
Sahsi Received on Thu Feb 11 2010 - 13:27:42 CST

Original text of this message