What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 3869 |  Welcome, Guest!   Register  Login
 Home > Interview Questions > SQL Server Interview Questions > Explain Composite Index in SQL Server. . ...

Explain Composite Index in SQL Server.

Interview question and answer by: CGN007 | Posted on: 6/21/2012 | Category: SQL Server Interview questions | Views: 976 | | Points: 40


Answer:

In SQL 2005 and 2008 we can add up to 16 columns in a index. Such index that consists of more than one columns is referred as composite index.
Both clustered and non-clustered indexes can be composite index.The order of the columns are very important here.

Syntax
CREATE INDEX index_name

ON [table_name] (col1,col2,...col16);


For example.
 CREATE INDEX IX_Student_Composite

ON [Student] (student_Code,student_Name);

Asked In: Many Interviews | Alert Moderator 
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

Even more ... | Submit Interview Questions and win prizes!

More Interview Questions from CGN007

Even more ... | Submit Interview Questions and win prizes!


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. | 5/24/2013 5:53:44 PM