DatabaseLink`
DatabaseLink`

SQLTables

SQLTables[conn]

returns the SQLTable objects for each table in an SQL connection.

SQLTables[conn,table]

returns objects for tables matching table.

更多信息和选项

  • To use SQLTables, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • The following options can be given:
  • "Catalog"Nonedatabase catalog to use
    "Schema"Nonedatabase schema to use
    "TableType""TABLE"type of table to return

范例

打开所有单元关闭所有单元

基本范例  (1)

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.

List all the tables:

Get a specific table by name:

Get the tables that match a pattern:

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.

Options  (1)

"TableType"  (1)

Get all types of tables in a data source: