You are here: Re: field is part of an index « MsSQL Server « IT news, forums, messages
Re: field is part of an index

Posted by Erland Sommarskog on 10/02/44 11:48

(rotaterx8@yahoo.com) writes:
> Hello all,
> What does it mean when a field is part of an index? Thank you.

That it is part of an index:

CREATE TABLE somefields (a int NOT NULL,
b int NOT NULL,
c datetime NULL,
d varchar(23) NOT NULL,
CONSTRAINT pk PRIMARY KEY (a,b))
go
CREATE INDEX d_ix ON somefields(d)

Here, all columns but c are parts of an index. a and b are part of
an index, because a primary key is implemented as an index in SQL Server.

I guess there is some reason why you ask. If you are trying to change the
collation of an indexed column, you must drop the index first, change
the collation, and then recreate the index.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация