---
title: "SQLTableInformation"
language: "en"
type: "Symbol"
summary: "SQLTableInformation[conn] returns a list of information about the tables in an SQL connection. SQLTableInformation[conn, table] returns information about table."
canonical_url: "https://reference.wolfram.com/language/DatabaseLink/ref/SQLTableInformation.html"
source: "Wolfram Language Documentation"
related_guides: 
  - 
    title: "DatabaseLink Tables and Data"
    link: "https://reference.wolfram.com/language/DatabaseLink/guide/DatabaseInformation.en.md"
  - 
    title: "Database Connections"
    link: "https://reference.wolfram.com/language/DatabaseLink/guide/DatabaseConnectionsAndResources.en.md"
  - 
    title: "SQL Database Operations"
    link: "https://reference.wolfram.com/language/DatabaseLink/guide/SQLDatabaseOperations.en.md"
related_functions: 
  - 
    title: "SQLTable"
    link: "https://reference.wolfram.com/language/DatabaseLink/ref/SQLTable.en.md"
  - 
    title: "SQLTables"
    link: "https://reference.wolfram.com/language/DatabaseLink/ref/SQLTables.en.md"
  - 
    title: "SQLTableNames"
    link: "https://reference.wolfram.com/language/DatabaseLink/ref/SQLTableNames.en.md"
  - 
    title: "SQLTableTypeNames"
    link: "https://reference.wolfram.com/language/DatabaseLink/ref/SQLTableTypeNames.en.md"
related_tutorials: 
  - 
    title: "DatabaseLink User Guide"
    link: "https://reference.wolfram.com/language/DatabaseLink/tutorial/Overview.en.md"
  - 
    title: "Table Structure in DatabaseLink User Guide"
    link: "https://reference.wolfram.com/language/DatabaseLink/tutorial/TableStructure.en.md"
---
## DatabaseLink\`

# SQLTableInformation

SQLTableInformation[conn] returns a list of information about the tables in an SQL connection. 

SQLTableInformation[conn, table] returns information about table.

## Details and Options

* To use ``SQLTableInformation``, you first need to load [*DatabaseLink*](https://reference.wolfram.com/language/DatabaseLink/guide/SQLDatabaseOperations.en.md) using ``Needs["DatabaseLink`"]``.

* The following options can be given:

|                       |         |                                             |
| --------------------- | ------- | ------------------------------------------- |
| "Catalog"             | None    | database catalog to use                     |
| "Schema"              | None    | database schema to use                      |
| "ShowColumnHeadings"  | False   | whether to return headings with the results |
| "TableType"           | "TABLE" | type of table to return                     |

## Examples (3)

### Basic Examples (1)

```wl
In[1]:= Needs["DatabaseLink`"]
```

If you find that the examples in this section do not work as shown, you may need to install or restore the example database with the ``DatabaseLink`DatabaseExamples``` package, as described in [Using the Example Databases](https://reference.wolfram.com/language/DatabaseLink/tutorial/UsingTheExampleDatabases.en.md).

Open a connection:

```wl
In[2]:= conn = OpenSQLConnection["publisher"];

In[3]:= SQLTableInformation[conn]//TableForm

Out[3]//TableForm=
|          |          |                |         |      |      |      |      |      |      |          |       |      |
| :------- | :------- | :------------- | :------ | :--- | :--- | :--- | :--- | :--- | :--- | :------- | :---- | :--- |
| "PUBLIC" ...  | Null |
| "PUBLIC" | "PUBLIC" | "TITLEDITORS"  | "TABLE" | Null | Null | Null | Null | Null | Null | "MEMORY" | False | Null |
| "PUBLIC" | "PUBLIC" | "TITLES"       | "TABLE" | Null | Null | Null | Null | Null | Null | "MEMORY" | False | Null |
```

Get information for a specific table:

```wl
In[4]:= SQLTableInformation[conn, "AUTHORS"]//TableForm

Out[4]//TableForm= "PUBLIC"	"PUBLIC"	"AUTHORS"	"TABLE"	Null	Null	Null	Null	Null	Null	"MEMORY"	False	Null
```

Get information for tables that match a pattern:

```wl
In[5]:= SQLTableInformation[conn, "TITLE%"]//TableForm

Out[5]//TableForm=
|          |          |                |         |      |      |      |      |      |      |          |       |      |
| :------- | :------- | :------------- | :------ | :--- | :--- | :--- | :--- | :--- | :--- | :------- | :---- | :--- |
| "PUBLIC" ...  | Null |
| "PUBLIC" | "PUBLIC" | "TITLEDITORS"  | "TABLE" | Null | Null | Null | Null | Null | Null | "MEMORY" | False | Null |
| "PUBLIC" | "PUBLIC" | "TITLES"       | "TABLE" | Null | Null | Null | Null | Null | Null | "MEMORY" | False | Null |

In[6]:= CloseSQLConnection[conn];
```

### Options (2)

#### "ShowColumnHeadings" (1)

```wl
In[1]:= Needs["DatabaseLink`"]

In[2]:= conn = OpenSQLConnection["publisher"];

In[3]:= SQLTableInformation[conn, "ShowColumnHeadings" -> True]//TableForm

Out[3]//TableForm=
|             |               |                |              |           |            |              |             |                             |                  |               |             |                 |
| :---------- | :------------ | : ...  False       | Null            |
| "PUBLIC"    | "PUBLIC"      | "TITLES"       | "TABLE"      | Null      | Null       | Null         | Null        | Null                        | Null             | "MEMORY"      | False       | Null            |

In[4]:= CloseSQLConnection[conn];
```

#### "TableType" (1)

```wl
In[1]:= Needs["DatabaseLink`"]
```

Get information for all types of tables in a data source:

```wl
In[2]:= conn = OpenSQLConnection["publisher"];

In[3]:= SQLTableInformation[conn, "TableType" -> SQLTableTypeNames[conn]]//TableForm

Out[3]//TableForm=
|     |     |     |     |     |     |     |     |     |     |     |     |     |
| :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- |
| "PUBLIC" | "INFORMATION_SCHEMA" | "ADMINISTRABLE_ROLE_AUTHORIZATIONS" | "SYSTEM TABLE" ... | False | Null |
| "PUBLIC" | "PUBLIC" | "TITLEDITORS" | "TABLE" | Null | Null | Null | Null | Null | Null | "MEMORY" | False | Null |
| "PUBLIC" | "PUBLIC" | "TITLES" | "TABLE" | Null | Null | Null | Null | Null | Null | "MEMORY" | False | Null |

In[4]:= CloseSQLConnection[conn];
```

## See Also

* [SQLTable](https://reference.wolfram.com/language/DatabaseLink/ref/SQLTable.en.md)
* [SQLTables](https://reference.wolfram.com/language/DatabaseLink/ref/SQLTables.en.md)
* [SQLTableNames](https://reference.wolfram.com/language/DatabaseLink/ref/SQLTableNames.en.md)
* [SQLTableTypeNames](https://reference.wolfram.com/language/DatabaseLink/ref/SQLTableTypeNames.en.md)

## Tech Notes

* [*DatabaseLink* User Guide](https://reference.wolfram.com/language/DatabaseLink/tutorial/Overview.en.md)
* [Table Structure in *DatabaseLink* User Guide](https://reference.wolfram.com/language/DatabaseLink/tutorial/TableStructure.en.md)

## Related Guides

* [DatabaseLink Tables and Data](https://reference.wolfram.com/language/DatabaseLink/guide/DatabaseInformation.en.md)
* [Database Connections](https://reference.wolfram.com/language/DatabaseLink/guide/DatabaseConnectionsAndResources.en.md)
* [SQL Database Operations](https://reference.wolfram.com/language/DatabaseLink/guide/SQLDatabaseOperations.en.md)