Description

Returns information about indexes for a specified table or for all tables.

Syntax

List_Index (tablename, returncolumnlist, indextypelist)

Parameters

The List_Index routine has the following parameters.

ParameterDescription
TablenameSpecifies the table name to find index information for. If null, then indexing information is returned for all attached tables.
ReturncolumnlistSpecifies a column or list of columns to return from the table specified in tablename. If null, the TABLE_NAME and COLUMN_NAME columns from the SYSDICT table are returned.
indextypelist

Specifies the type of indexes to return. If no index type is specified, all index types are returned. The index options are:

indextypelistDescription
1Btree index.
2Cross Reference index.
3Relational index.

Returns

A row for each column specified in returncolumnlist. Each return row contains the following:

(table, column, btree, crossref, relational)
Return columnValue
TableTable name.
ColumnColumn name.
BtreeIf true (1), a Btree index exists for column.
crossrefIf true (1), a Cross Reference index exists for column.
relationalIf true (1), a Relational index exists for column.

Example

run List_Index "CUSTOMERS"
produces:
CUSTOMERS, CUSTOMER_NAME, 0, 1, 0
CUSTOMERS, CUSTOMER_NAME_XREF, 1, 0, 0
CUSTOMERS, FNAME, 1, 0, 0
CUSTOMERS, LNAME, 1, 0, 0
CUSTOMERS, STATE, 1, 1, 0
CUSTOMERS, STATE_XREF, 1, 0, 0
  • No labels