How to Create Indexes

You can create an index using the SQL Server 2000 Index Wizard, TRANSACT-SQL, or via the Enterprise Manager.

NOTE

You cannot create an index on the following data types:

bit 
text
image

New for SQL Server 2000 is index creation on a view and a computed column.

Using the SQL Enterprise Manager, select a server and then click the Wizards icon from the toolbar. The Wizard Selection dialog box appears. Expand the Database options by clicking on the + sign. Then follow these steps to create an index (the following example uses the pubs database):

1.
Select the Create Index Wizard from the Wizard Selection dialog box. The Create Index Wizard Welcome dialog box appears (see Figure 18.8).
Figure 18.8. The Create Index Wizard ...

Get Microsoft® SQL Server™ 2000 DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.