how to create a index in sql server and types

Posted by Ramsakthi under Sql Server on 3/19/2012 | Points: 10 | Views : 916 | Status : [Member] | Replies : 4
Hi,

i need how to create a index in sql server 2005 with example?
Regards,
Ramsakthi,

Ramu.R


Responses

Posted by: Rajni.Shekhar on: 3/20/2012 [Member] Bronze | Points: 25

Up
0
Down
You can refer to create types
http://msdn.microsoft.com/en-us/library/ms175007.aspx

to create indexes
http://msdn.microsoft.com/en-us/library/ms188783.aspx

Thanks,
Rajni Shekhar

Ramsakthi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 3/20/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi Sksamantaray

How to USe Cursor...in Sql

Wat is the Use

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Ramsakthi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 6/21/2012 [Member] Bronze | Points: 25

Up
0
Down
There are two types of Indexs
1.Clustered Index
2.Non Clustered Index
Clustered Index
A clustered index sorts and stores the data rows of the table or view in
order based on the clustered index key. The clustered index is
implemented as a B-tree index structure that supports fast retrieval of
the rows, based on their clustered index key values.
CREATE CLUSTERED INDEX MyIndex1 ON MyTable(Column1);

Non Clustered Index

A nonclustered index can be defined on a table or view with a clustered
index or on a heap. Each index row in the nonclustered index contains the nonclustered key value and a row locator. This locator points to the data row in the clustered index or heap having the key value. The rows in the index are stored in the order of the index key values, but the data rows are not guaranteed to be in any particular order unless a clustered index is created on the table.

CREATE NONCLUSTERED INDEX MyIndex2 ON MyTable(Column);

Ramsakthi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response