DictTable.clusterIndex Method

Returns the ID of the clustered index for the table.

Syntax

public IndexId clusterIndex([boolean asDefinedInAOT])

Run On

Called

Parameters

  • asDefinedInAOT
    Type: boolean
    A value that indicates whether the clustered index to retrieve is defined in the AOT. A value of true returns the clustered index as defined in the AOT. A value of false returns the clustered index as defined in the SQL table; optional.

Return Value

Type: IndexId Extended Data Type
The ID of the clustered index for the table; 0 (zero) if there is no clustered index for the table.

Examples

The following example shows the retrieval of the clustered index for a table.

DictTable dt; 
DictIndex di; 
int       i; 
 
dt = new DictTable(tablenum(CustTable)); 
if (dt) 
{ 
    i = dt.clusterIndex(); 
    if (0 != i) 
    { 
        di = new DictIndex(tablenum(CustTable), i); 
        print di.name(); 
    } 
}

See Also

DictTable Class

Clustered Indexes