Difference between inline view and WITH clause?
9
votes
5
answers
33970
views
Inline views allow you to select from a subquery as if it were a different table:
SELECT
*
FROM /* Selecting from a query instead of table */
(
SELECT
c1
FROM
t1
WHERE
c1 > 0
) a
WHERE
a.c1 < 50;
I've seen this referred to using different terms: inline views, WITH clause, CTE and derived tables. To me it seems they are different vendor specific syntax for the same thing.
Is this a wrong assumption? Are there any technical/performance differences between these?
Asked by Kshitiz Sharma
(3367 rep)
May 2, 2017, 02:07 PM
Last activity: May 16, 2018, 08:33 PM
Last activity: May 16, 2018, 08:33 PM