From the course: Microsoft SQL Server 2022 Essential Training

Unlock this course with a free trial

Join today to access over 24,100 courses taught by industry experts.

Create additional indexes on a table

Create additional indexes on a table

- [Instructor] We've previously seen how to add additional indexes to a table when I demonstrated the unique constraint. As a reminder, you can open up the table in the graphical designer by right clicking on any of the tables and choosing design. You would then right click on the column fields and choosing indexes from the popup menu. This will give you everything that you need to add new non-clustered indexes to your tables that will speed up the queries on those indexed columns. So instead of demonstrating this workflow again, let's go ahead and add an index to our database using T-SQL commands instead. I'm going to close this window, and then close the design window. Then I'll open up a new query editor. Now I've determined that we regularly need to search for customers by their last name. In order to speed up those searches, I want to add a non-clustered index on that column of data. To do that, I'll use the command…

Contents