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!

Query is executed although sub-query is error?

xi`tinSep 6 2009 — edited Sep 7 2009
Hi everyone,

I have a problem want to explained.

My sub-query show an error if it's executed alone: "ORA-00904: invalid column name"
SELECT id FROM table_A WHERE field1 = 'exam' (field1 is not exist)

But when execute with:
SELECT * FROM table_B WHERE id IN (SELECT id FROM table_A WHERE field1 = 'exam')

it's ok, although we don't have any data filtered. I don't known the reason why? Can anyone explain this?

Thanks a lot!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2009
Added on Sep 6 2009
7 comments
786 views