O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to Create Indexes

To create an index on a table, you have to select on which columns to build the index, and then use the CREATE INDEX statement. As an example, to create the index called ndx_Customers_City on the City field of the Customers table, you must execute the statement of Listing 6.9.

Code Listing 6.9. Creating an Index Is Easy Using the CREATE INDEX Statement
					
USE Northwind
GO

CREATE INDEX ndx_Customers_City
ON Customers(City)

You can use Enterprise Manager to create indexes on tables using the Manage Indexes form. To open the Manage Indexes form, you must display the list of tables in a database, select the table in which you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required