Click here to Skip to main content
15,908,115 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi, All

How to create clustered index with two columns

C#
create clustered index cdx_students on student_table(studentID&BatchID)


is that query correct.... then How to do...

Thanks!
Posted
Updated 24-Aug-14 20:10pm
v4
Comments
[no name] 24-Aug-14 10:51am    
Did you try it? Shouldn't it be create clustered index cdx_students on student_table(studentID,BatchID)?
prasanna.raj 24-Aug-14 10:53am    
yes its correct ?
David Lee 145 24-Aug-14 21:34pm    
I think Management Studio can generate the script for you properly. How about trying it?

1 solution

SQL
create clustered index cdx_students on student_table(studentID&BatchID)


I think it should be


SQL
create clustered index cdx_students on student_table(studentID,BatchID)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900