From the course: Microsoft SQL Server 2019 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Create additional indexes on a table - SQL Server Tutorial
From the course: Microsoft SQL Server 2019 Essential Training
Create additional indexes on a table
- [Instructor] Adding additional indexes to a table using Management Studio is very easy. In fact, we've already done it once in this course. Indexes are the way that SQL Server also manages unique constraints on our data. So this process will probably seem very familiar to you. Let's add an index to the last name column of the LandonHotel Guests table. To do this, I'll right-click on the table here in the Object Explorer window and choose Design from the pop-up menu. Then we can right-click anywhere here and over these columns or anywhere in the blank area, and choose Indexes and Keys from the pop-up menu. Next, in the Indexes and Keys window, I'll press the Add button to create my new index. It gets the default name of IX_Guests here, and the only thing that I need to do is to change the Column that we're applying the index to. The default is going to be the primary key for the table, so I'll just click here, then click on the ellipsis button, and I'll change it using the drop-down…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.