Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Update with Select from a non-existant column

slsam01May 7 2013 — edited May 9 2013
Hello,

If I have two tables in Oracle database:
Table_1 has column id, c1, c2
Table_2 has column id, c1, c2

If I run the following select statement, it will give error, because column c3 does not exist:
select c3 from table_2;

However, if I run the following update statement, it run successfully with error. It shows, for example, 10 rows updated:
update table_1 t1 set t1.c2 =
(select t2.c3 from table_2 t2
where t2.id = t1.id);

Could someone explain to me what happens?

Regards!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 6 2013
Added on May 7 2013
11 comments
1,464 views