Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select statement in from clause
Proffesional newbie wrote:
> Hi i found the next select statement and i was wondering what this
> select statement in the from clause does ?
> It is the first time i see this.
Basically it is a view. Consider this view: CREATE VIEW foo AS SELECT * FROM table2 WHERE col1 < SYSDATE
We select from this view:
SELECT
*
FROM foo
Replace the view name with its select and you get:
SELECT
*
FROM (SELECT * FROM table2 WHERE col1 < SYSDATE)
There is very little difference between SQL 1 and SQL 2. In 2 we simply substituted the name of the view with the actual SELECT statement for that view. Which is exactly what the database engine does with SQL 1.
-- BillyReceived on Wed Sep 18 2002 - 04:28:51 CDT
![]() |
![]() |