Larry Brister
asked on
Add index to table
I have a table with a primary key.
How would I add an index to an additional column?
How would I add an index to an additional column?
There are normally two types of indexes - Clustered and non-Clustered. Primary keys normally create clustered index. So which type of index do you want to create on another column?
If you want to create nonclustered index then you can simply use
CREATE INDEX INDEX_NAME
on TABLENAME (COLUMN NAME)
If you want to create nonclustered index then you can simply use
CREATE INDEX INDEX_NAME
on TABLENAME (COLUMN NAME)
ASKER
angelIII:
I have a table that stores our media "mail history" ...actual addresses for bulk mail
the mailID is the primary key
Ive been asked to add an index on AddrID column
I have a table that stores our media "mail history" ...actual addresses for bulk mail
the mailID is the primary key
Ive been asked to add an index on AddrID column
So if your table is called MailHistory you would use
CREATE INDEX idxAddrID
on MailHistory (AddrID)
CREATE INDEX idxAddrID
on MailHistory (AddrID)
ASKER
malikirfan28: was first and Neilsr: was precise
Any problems with a 350/150 split?
Any problems with a 350/150 split?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hey you can create a non cluster index on other than primary key. Same as cluster index
Create index Indexname on Table (Columnname)
Create index Indexname on Table (Columnname)
ASKER
malikirfan28
You have a valid point
You have a valid point
what is the exact issue you have?