What is an inline view?

Showing Answers 1 - 10 of 10 Answers

Santosh

  • Apr 16th, 2006
 

If we write a query in the from clause then this is called inline view or online query.

  Was this answer useful?  Yes

Guest

  • Jun 28th, 2006
 

The inline view is a construct in Oracle SQL where you can place a query in the SQL FROM, clause, just as if the query was a table name.

select
   fs.tablespace_name                          "Tablespace",
   (df.totalspace - fs.freespace)              "Used MB",
   fs.freespace                                "Free MB",
   df.totalspace                               "Total MB",
   round(100 * (fs.freespace / df.totalspace)) "Pct. Free"
from
   (select
      tablespace_name,
      round(sum(bytes) / 1048576) TotalSpace
   from
      dba_data_files
   group by
      tablespace_name
   ) df,
   (select
      tablespace_name,
      round(sum(bytes) / 1048576) FreeSpace
   from
      dba_free_space
   group by
      tablespace_name
   ) fs
where
   df.tablespace_name = fs.tablespace_name;

  Was this answer useful?  Yes

Anonymous

  • Nov 5th, 2006
 

Actually, the optimizer will execute an inline view exactly the same way it would execute an ordinary view. There is a related thread at Oracle Forums.

  Was this answer useful?  Yes

g_sidhu

  • Feb 6th, 2008
 

An inline view is created by placing a subquery in the FROM clause and giving that subquery an alias. The subquery defines a data source that can be referenced in the main query.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions