By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,574 Members | 1,977 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,574 IT Pros & Developers. It's quick & easy.

field is part of an index

P: n/a
Hello all,
What does it mean when a field is part of an index? Thank you.

May 24 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
(ro*******@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, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
May 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.