question

punnashiva avatar image
punnashiva asked

difference between select query and View

difference between select query and View In that view, we can write the query like ex : join of two tables where as in select query we can write those query. So what is the major difference between select query and view
selectsqlserverview
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

iainrobertson avatar image iainrobertson commented ·
Is this homework by any chance?
0 Likes 0 ·

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
Within the query optimizer, there is effectively no difference at all. The view is nothing more than a mask on top of a query that appears to act like a table. But it is absolutely not a table and should never be thought of as such. The exception to that is the materialized view which is actually a table to all intents and purposes.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.