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

</div>

Method

# Database_Class.TableSchema

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

<div class="warning">

<div class="title">

Warning

</div>

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

</div>

## Description

Returns a `RowSet</api/databases/rowset>` with a list of all tables in the database.

## Notes

TableSchema returns a `RowSet</api/databases/rowset>` with one field: TableName As `String</api/data_types/string>`.

## Sample code

The following code gets the <span class="title-ref">TableSchema</span> for the connected database and displays each table name:

``` xojo
' App.DB is a connected database
Dim tables As RecordSet
tables = App.DB.TableSchema

If tables <> Nil Then
  While Not tables.EOF
    MsgBox(tables.IdxField(1).StringValue)
    tables.MoveNext
  Wend
  tables.Close
End If
```

## Compatibility

All project types on all supported operating systems.

## See also

`Database</api/databases/database>` parent class; `Database.TableColumns<database.tablecolumns>` method
