View:
The view is equivalent to a query result, which corresponds to a table
Table----where data is actually stored
View---does not store data, showing the results of the query
Attention:
1, the view is for the convenience of querying data. Generally do not attempt to insert data into the view, error-prone.
2. Views can be generated by a single table or generated by multiple tables, and a new view can be generated from each view of the table.
3, the main function of the view is to query, not to increase the deletion.
Operation:
1. Right click on the view and click New View
2, the construction of a good view, the query statement written in the box below
Index:
Indexes are designed to improve the efficiency of queries
Indexes are clustered and non-clustered indexes
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.
Attention:
Index to improve query efficiency, but will affect the efficiency of adding and deleting.
Operation:
1, in the table design interface, click the column to be indexed, right-click the ' Index/key '
2. Click Add in the bottom left corner of the pop-up box and select the index on the right.
SQL View Index