Index_Segment_Direction

The sort direction of the segment.

Supported By

SQL Drivers (SQL Server, DB2 and ODBC)

Value

ASCENDING, DESCENDING

Associated Attribute

DF_INDEX_SEGMENT_DIRECTION (enum list)

Remarks

The direction of a certain segment. If you want to set the direction, this must be done directly after the Index_Segment keyword. The keyword can be set to either ASCENDING or DESCENDING. ASCENDING is the default value.

This keyword should only be used for Client indexes. Server indexes will be whatever they are as defined on the server - the behavior when applying this keyword to server indexes is unpredictable. Only the INDEX_NUMBER and INDEX_NAME keywords apply to server indexes.

 

Therefore, if we wanted to modify the index below to make the last two index segments descending,

Index_number 4

Index_Number_Segments 3

Index_Segment_Field 5

Index_Segment_Field 3

Index_Segment_Field 2

the definition would look like:

Index_number 4

Index_Number_Segments 3

Index_Segment_Field 5

Index_Segment_Field 3

Index_Segment_Direction DESCENDING

Index_Segment_Field 2

Index_Segment_Direction DESCENDING

 

See Also

Index Keywords, SQL Index Types