SQLTableIndexInformation
SQLTableIndexInformation[conn]
returns a table of indices and statistics for a table.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
DatabaseLink`
DatabaseLink`
SQLTableIndexInformation
SQLTableIndexInformation[conn]
returns a table of indices and statistics for a table.
Details and Options
- To use SQLTableIndexInformation, you first need to load DatabaseLink 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
Examples
Basic Examples (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.
Create a table with a primary key and an index column:
conn = OpenSQLConnection["demo"];SQLCreateTable[conn, SQLTable["TEST1"], {SQLColumn["id", "DataTypeName" -> "Integer", "PrimaryKey" -> True], SQLColumn["Name", "DataTypeName" -> "VARCHAR", "DataLength" -> 255]},
"Index" -> "Name"]Both columns appear as table indices:
SQLTableIndexInformation[conn, "TEST1", "ShowColumnHeadings" -> True]//TableFormSQLDropTable[conn, "TEST1"];CloseSQLConnection[conn];