From the course: Developing Microsoft SQL Server 2016 Databases

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Single column and composite indexes

Single column and composite indexes

- [Voiceover] Both clustered and nonclustered indexes can be made up of one, or more, columns from the data table. When multiple columns are involved, up to a maximum of sixteen, then the index is referred to as a composite index. With a composite index, the order or sequence of the columns matters. Let's go ahead and take a look at an example. First, I'm going to switch into the WideWorldImporters database. Then, I want to take a look at a specific table inside of this database. So, let's go ahead and open up the databases folder and expand WideWorldImporters. And then I'll find the table called Purchasing.PurchaseOrderLines. Let's go ahead and expand that one open and find the folder for indexes, and we'll see all the different indexes that are already inside of this table. We can see that there's a clustered index on the primary key for the table, and then we also have some additional indexes on different fields.…

Contents