The role of the view, the view can change it?

 

A view is a virtual table, and the table containing the data is not the same, only the view contains a query that retrieves data when using dynamic; does not contain any columns or data.

Use view to simplify complex sql operation, specific details are hidden, protected data; create a rear view, may be used in the same manner as the table using them.
View can not be indexed, it can not have triggers or default values associated with it, if there is order by itself is within view of the order by the view once again will be overwritten.


Create view: create view XXX as XXXXXXXXXXXXXX;
for some views, such as not using linkers inquiry packet aggregation function Distinct Union and so on, it can be updated, to update the view of the base table will be updated;

But the view is mainly used to simplify retrieval, data protection, is not used to update, and most of the view can not be updated.

Guess you like

Origin www.cnblogs.com/sea-stream/p/11298082.html