Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating an index

Status
Not open for further replies.

eja2000

Programmer
Nov 30, 2003
209
NG
i have a table with several rows..i want to create a key on a field that i wil include in my WHERE sql statements..the field will not be a primary key but the degree of uniqueness will be very high..

What i mean is that there may be a few fields in the table
with the same value for this field but generally the degree of uniqueness is 95%.i have an autoincrementing integer primary key on the table but i doesnt appear in sql statements..

can u show me how to create this index in TSQL and what will it be (clustered or non clustered)?
Thx
 
Look at create index in bol.

create index ix on tbl
(fld1, fld2, fld3)



======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
will it affect existing data?
i have about 5000 rows in there..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top