sqloracle-databasesubqueryinline-view

Oracle syntax for subselect in FROM clause?


According to Using Subqueries Oracle SQL accepts a subquery in the from-clause of a select statement, like

SELECT * FROM ( SELECT a FROM b );

However, looking at the SELECT documentation, I see no possibility to get to select/subquery in the from clause (e.g. from the rules table_reference or join_clause).

Am I missing something here, is this part of the SQL grammar documented elsewhere? Or is this another incomplete part of the documentation?


Solution

  • In the documentation you linked, you can see that table_reference can be a query_table_expression which can be a ( subquery ).