SQLTableNames[conn]
returns the names of each table in an SQL connection.
SQLTableNames[conn,table]
returns the names matching table.
更多信息和选项
范例
基本范例
Options
"TableType"
参见
技术笔记
相关指南
DatabaseLink`
DatabaseLink`
SQLTableNames
SQLTableNames[conn]
returns the names of each table in an SQL connection.
SQLTableNames[conn,table]
returns the names matching table.
更多信息和选项
- To use SQLTableNames, 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 "TableType" "TABLE" type of table to return
范例
打开所有单元 关闭所有单元基本范例 (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.
conn = OpenSQLConnection["publisher"];Get the names of all the tables:
SQLTableNames[conn]Get the names of tables matching a pattern:
SQLTableNames[conn, "TITLE%"]CloseSQLConnection[conn];