List_Index routine

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

List_Index(tablename, returncolumnlist, indextypelist)

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.
indextypelistSpecifies the type of indexes to return. If no index type is specified, all index types are returned. The index options are:

indextypelist Description
1 - Btree index.
2 - Cross Reference index.
3 - Relational index.

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.
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
  • guides/programming/programmers_reference_manual/list_index.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1