CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
HOME | BROWSE | GROUPS | REFERENCE | ADD CODE | LINKS | SPONSORS
It's time to sign up for your 2010 PSOUG membership!
Click here to join PSOUG now!
Search the Reference Library pages:  
Help us help you! Take our 1-minute PSOUG survey. Free Oracle Magazines & Oracle White Papers

Oracle Inline Views
Version 11.1
 
Basic Inline View Select

Single Table
SELECT <column_name_list>
FROM (
  <SELECT_statement>);
SELECT object_type, COUNT(*)
FROM all_objects
GROUP BY object_type
;

SELECT object_type
FROM (
  SELECT object_type, COUNT(*)
  FROM all_objects
  GROUP BY object_type
);

SELECT object_type
FROM (
  SELECT object_type, COUNT(*) OTCNT
  FROM all_objects
  GROUP BY object_type)
WHERE otcnt > 100;
 
In-line View with Join

Join In-line views
SELECT <column_name_list>
FROM (
  <SELECT_statement>) <alias_1>
     (
  <SELECT_statement>) <alias_2>
WHERE alias_1.condition = alias_2.condition;
SELECT table_name, num_rows
FROM user_tables
;

SELECT index_name, table_name
FROM user_indexes
;

SELECT num_rows, index_name
FROM (SELECT table_name, num_rows FROM user_tables) a,
    
(SELECT index_name, table_name FROM user_indexes) b
WHERE a.table_name = b.table_name(+);
 
Related Topics
SELECT Statement
 
Contact Us Legal Notices and Terms of UsePrivacy Statement
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [57 visitors online]    © 2009 psoug.org