Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 350 |  Welcome, Guest!   Register  Login
 Home > Forums > Sql Server > how to create a index in sql server and types ...
Ramsakthi

how to create a index in sql server and types

Replies: 4 | Posted by: Ramsakthi on 3/19/2012 | Category: Sql Server Forums | Views: 305 | Status: [Member] | Points: 10  


Hi,

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

Ramsakthi.R


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Sksamantaray
Sksamantaray  
Posted on: 3/19/2012 10:38:20 PM
Level: Silver | Status: [Member] | Points: 25

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

Rajni.Shekhar
Rajni.Shekhar  
Posted on: 3/20/2012 4:42:05 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Sabarimahesh
Sabarimahesh  
Posted on: 3/20/2012 5:14:09 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Muhsinathk
Muhsinathk  
Posted on: 6/21/2012 6:04:25 AM
Level: Bronze | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

Found interesting? Add this to:


 Latest Posts

Write New Post | More ...

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 10:21:24 PM