SQLUSA

Microsoft SQL Server 2000

Best Practices

 

How to create a covering index?

 

For the query:

USE Northwind

SELECT city FROM Customers
WHERE country = 'UK'

The following covering index (no need to read data pages) can be created:

CREATE INDEX IDXLocation ON Customers(country, city)
GO


The World Leader in SQL Server Training
 
SQLUSA.com Home Page