Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to create an index based on multiple columns

Status
Not open for further replies.

jakeir

Programmer
Apr 7, 2009
25
US
Hi,
I am being asked to do the following:
Put an index on ths table when created, SortIDX, = FamID Any MasterID ,Enrollment_Month
Basicaly to create an index based on multiple columns. While I have done this on one column I am not sure of the syn-text for multiple columns. Can some one please tell me how you would do this.
Thank you
 
Syntax:
Code:
   create [unique] [clustered | nonclustered]                                   
          index index_name                                                      
      on [[database.]owner.]table_name                                          
            (column_name [asc | desc]                                           
              [, column_name [asc | desc]]...)                                  
      [with { fillfactor = pct,                                                 
              max_rows_per_page = num_rows,                                     
              reservepagegap = num_pages,                                       
              consumers = x, ignore_dup_key, sorted_data,                       
              [ignore_dup_row | allow_dup_row],                                 
              statistics using num_steps values  } ]                            
      [on segment_name]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top