Query against a view | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Query against a view


Hi Everyone – I have a query builder (filter) that runs
against the database – after the filter is
built, the application appends the tables that
are needed to be joined. the query that is created from the filter and
the user selected criteria is then applied
to the data. The data is passed back as a disconnected recordset. So I was wondering if… Can a query be applied to a view? AND Does the view get processed before the query is applied to it? thanks
tony
Hi Tony,
Yep, you can query a view, but my understanding is that the entire view is built first, then the query is run against the results of the view… Ben
Tony,
view is also referred as virtual table so firing query on any view requires existence of that view object.
So obviously view gets created firstly and then u can fire queries based on that view.
so while firing any query just deal with views like a table object.
]]>