<div class="meta" robots="noindex">

</div>

Method

# Database_Class.IndexSchema

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `Database.TableIndexes<database.tableindexes>` as a replacement.

</div>

## Description

Returns a `RowSet</api/databases/rowset>` containing the list of indexes for the passed **TableName**. Returns `Nil</api/language/nil>` if the table has no indexes or the database source does not support indexes.

## Notes

The `RowSet</api/databases/rowset>` returns one row for each index on the table and it has one field: IndexName As `String</api/data_types/string>`.

The RecordSet result has a single column: \* IndexName: A string containing the name of the index.

## Sample code

This code displays the indexes for the "Invoices" table (if it exists) in the specified SQLite database:

``` xojo
Dim dbFile As FolderItem
dbFile = GetOpenFolderItem("")

If dbFile <> Nil Then
  Dim db As New SQLiteDatabase
  If db.Connect Then
    Dim indexRS As RecordSet
    indexRS = db.IndexSchema("Invoices") ' A table with indexes in the SQLite DB
    If indexRS <> Nil Then
      While Not indexRS.EOF
        MsgBox("Index: " + indexRS.IdxField(1).StringValue)
        indexRS.MoveNext
      Wend
      indexRS.Close
    End If
  End If
End If
```

## Compatibility

All project types on all supported operating systems.
