Select (SQL): Difference between revisions

Content deleted Content added
removing undefined reference
Fjerdingen (talk | contribs)
Inline view: derived table is the ANSI/ISO SQL standard term (Feature F591, Derived tables). Inline view is a vendor specific term.
Line 128:
Since 1999 the SQL standard allows named subqueries called [[common table expression]]s (named and designed after the IBM DB2 version 2 implementation; Oracle calls these [[subquery factoring]]). CTEs can also be [[recursive]] by referring to themselves; [[Hierarchical and recursive queries in SQL|the resulting mechanism]] allows tree or graph traversals (when represented as relations), and more generally [[fixpoint]] computations.
 
=== InlineDerived viewtable ===
 
AnA Inlinederived viewtable is the use of referencing an SQL subquery in a FROM clause. Essentially, the inlinederived viewtable is a subquery that can be selected from or joined to. Derived Inline Viewtable functionality allows the user to reference the subquery as a table. The inlinederived viewtable also is referred to as aan ''derivedinline tableview'' or a ''subselect''. Inline view functionality was introducedselect in Oraclefrom 9ilist''.
 
In the following example, the SQL statement involves a join from the initial Books table to the Inlinederived viewtable "Sales". This inlinederived viewtable captures associated book sales information using the ISBN to join to the Books table. As a result, the inlinederived viewtable provides the result set with additional columns (the number of items sold and the company that sold the books):
 
<syntaxhighlight lang="sql">