T-SQL - What is an inline-view?

后端 未结 7 1694
春和景丽
春和景丽 2021-01-06 10:39

I recently answered this question how-to-call-user-defined-function-in-order-to-use-with-select-group-by-order-by

My answer was to use an inline view to perform the

相关标签:
7条回答
  • 2021-01-06 11:12

    From here: An inline view is a SELECT statement in the FROM-clause of another SELECT statement. In-line views are commonly used simplify complex queries by removing join operations and condensing several separate queries into a single query.

    0 讨论(0)
  • 2021-01-06 11:14

    I think another term (possibly a SQL Server term) is 'derived table'

    For instance, this article:

    http://www.mssqltips.com/tip.asp?tip=1042

    or

    http://www.sqlteam.com/article/using-derived-tables-to-calculate-aggregate-values

    0 讨论(0)
  • 2021-01-06 11:19

    This MSDN article claims that an inline view is another term for a derived table, and refers to the same thing everyone else is describing in this thread (subquery in FROM). An alternative in sql server 2005 and up is the common table expression.

    0 讨论(0)
  • 2021-01-06 11:26

    IMHO, an "inline view" is just another expression for a row-returning sub-query.

    In other words — an SQL expression that could be replaced entirely by the name of a view (therefore, a correlated sub-query does not qualify as an inline view).

    0 讨论(0)
  • 2021-01-06 11:29

    Another term often more commonly used for an inline view is 'Embedded Select Statement'

    So a select inside a select.

    0 讨论(0)
  • 2021-01-06 11:33

    An inline view is a virtual table created in the from statement during the execution of the code/program

    0 讨论(0)
提交回复
热议问题