Master:
1. What is a view?
2. Will build the view, will look up the view
3. Know that the main function of the view is to query, not to delete and remove changes.
Definition of the View:
A view can be thought of as a table exported from a data table or multiple data tables, and the view itself has no data, it is used to hold the definition of the view, so the view is only a virtual table, and if the data record in the data table changes, the view associated with that table will change accordingly.
The view--corresponds to the result of the table query.
Table-where the data is actually stored.
View--no data is stored and the results of the query are displayed.
The role of the view:
1, improve the security of data access
2, convenient query operation
Creating views : Create VIEW name as ... go (view name: Example View_ ... )
Call View : SELECT * from view name
Delete View : Drop view Name
Views are divided into: Single table created views, multi-table views, functions or grouped data views, view-based views, read-only views, and more
Views are convenient for querying data. Generally do not attempt to insert data into the view, error-prone.
Summary: Creating a view is primarily about security and simplifying queries, creating a view that can be a data table, multiple data tables, or an existing view ... Views can be queried and updated like a data table, and query operations are performed on the view using the SELECT statement, which is the same as the query operation of the data table. You can also use the INSERT, UPDATE, DELETE statements to update the data in the view. No research here for the time being ...
Master:
1. What the index is.
2. Index classification and efficiency. Principle.
3. Index to improve query efficiency, but will affect the efficiency of adding and deleting.
4. How to index and delete indexes.
index: To improve query efficiency.
Category: Clustered index, non-clustered index
1. The default storage order of data is the same as the order of the cluster index. Only one cluster index can be in a table.
2. The non-clustered index is placed separately, when querying, first check the non-family index, and then follow the non-clustered index query content. , a table can have multiple non-clustered indexes.
Creating index: CREATE index index name (ix_ ... ) on table (column, [column]); Go
SQL database-<...> view ... Simple Learning