Database - Difference between clustered and non-clustered index

Difference between clustered and non-clustered index.

- Both stored as B-tree structure. The leaf level of a clustered index is the actual data where as leaf level of a non-clustered index is pointer to data.
- We can have only one clustered index in a table but we can have many non-clustered index in a table. Physical data in the table is sorted in the order of clustered index while not with the case of non-clustered data

Difference between clustered and non-clustered index.

- A clustered index is unique for a given table. The actual data is at the leaf level of a clustered index and data is resorted.
- Non-clustered index has the leaf level which has pointers to the data in the rows, so that one table can have as many as non-clustered indexes in a database.
Database - Define aggregate and scalar functions
Aggregate Functions return a single value by operating against a group of values....
Database - What are the restrictions applicable while creating views?
Views can be created referencing tables and views only in the current database...
Database - What is "correlated subqueries"?
A correlated sub query is a type of sub query. Unlike sub query, a correlated sub query is dependent upon the outer query....
Post your comment