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!

Select as a table source in SQL

277824May 18 2005 — edited May 18 2005
I vaguely remember reading about an SQL feature Oracle 9.2 supports, but cant remember the syntax.

Below is an example

Here is an SQL that works...
SELECT a.col1, c.col2
FROM ( SELECT tbl1.col1
FROM tbl1, tbl2
WHERE tbl1.col2 = tbl2.col2 ) a
, tbl3 c
WHERE c.col1 = a.col1

There is alternate syntax for the same functionality that is MUCH easier to read and document when you have more complex selects involved, but I can't remember the keyword. It is something like...

KEYWORD( SELECT tbl1.col1
FROM tbl1, tbl2
WHERE tbl1.col2 = tbl2.col2 ) a
SELECT a.col1, c.col2
FROM a
, tbl3 c
WHERE c.col1 = a.col1

But I can't remember or find anywhere what KEYWORD should be.

Anyone have an idea?

Thanks,
Chris Elvart of SBC
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2005
Added on May 18 2005
1 comment
148 views