Join Adam Wilbert for an in-depth discussion in this video Creating a nonclustered index using DDL, part of Database Foundations: Storage.
- We'll want to search through…our invoices regularly to find orders placed…by specific customers.…So it makes sense to add an additional nonclustered index…on the Customer ID field in the Invoices table.…In order to do that,…using DDL commands,…I'll start up a new query window here,…and we'll use the CREATE statement to make it.…The thing that we want to create is a nonclustered index,…so I'll use the keyboard's NONCLUSTERED INDEX…and then we'll follow that with the name of the index…that we're about to create.…In this case, I'm going to type in:…IX_Invoices_CustomerID…On the next line,…we get to specify where the index…is going to be created on,…so I'll type the keyword ON,…followed by the Invoices,…which is the name of the table.…
And then in parentheses,…the name of the field within that table,…which again is CustomerID.…We'll finish that with the ending semicolon here,…and I'll press the Execute button,…and we get the message…that a command was completed successfully.…Let's go ahead and take a look at our Invoices table now.…
Note: This course will also prepare certification candidates for the "Understanding data storage" domain of the Microsoft Technology Associate (MTA) Exam 98-364, Database Administration Fundamentals. Find out more at https://www.microsoft.com/learning/en-us/exam-98-364.aspx.
- Reducing redundancy with normalization
- Fixing partial dependencies
- Creating primary keys
- Linking tables with foreign keys
- Creating clustered and nonclustered indexes
Skill Level Beginner
1. Creating Normalized Tables
2. Adding Key Fields
3. Indexing Records
Adding a clustered index3m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.