In SQL Server, there are two types of indexes (clustered index and non-clustered index) in name, but there are actually three types of indexes internally.
Clustered index non-clustered index: Non-clustered index on the stack; in clustered tables, non-clustered index SQL Server indexes are generally stored in the clustered index using the B-tree. The clustered index's leaf level is the real data. That is to say, once the leaf level of the index is reached, the new record is inserted based on the correct physical location in the clustered index. The structure is as follows:
For clustered indexes on the stack, the leaf level is not data, but data pointers, and the data referred to by these pointers is not connected: The structure is as follows:
The non-clustered index of the clustered table is the same as the previous two, which are the leaf nodes ,,
He is actually a link to two clustered indexes. When he reaches the first leaf-level node, he does not reach the data, but a pointer points to the root node of another index node.