Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

T-SQL - What is an inline-view?

Tags:

sql

tsql

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 function and then group on that.

In comments the asker has not understood my response and has asked for some sites / references to help explain it.

I've done a quick google and haven't found any great resources that explain in detail what an inline view is and where they are useful.

Does anyone have anything that can help to explain what an inline view is?

like image 272
Robin Day Avatar asked Dec 13 '22 04:12

Robin Day


1 Answers

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.

like image 149
Otávio Décio Avatar answered Dec 25 '22 11:12

Otávio Décio