SQLColumns
SQLColumns[conn]
returns the SQLColumn object for each column in an SQL connection.
SQLColumns[conn,table]
returns the columns in table.
SQLColumns[conn,SQLTable[table]]
returns the columns in table.
SQLColumns[conn,{table,column}]
returns the columns in table matching column.
SQLColumns[conn,SQLColumn[{table,column}]]
returns the columns in table matching column.
SQLColumns[conn,SQLColumn[column]]
returns the columns in any table matching column.
更多信息和选项
- To use SQLColumns, you first need to load DatabaseLink using Needs["DatabaseLink`"].
- Table and column specifications may include SQL wildcards.
- The following options can be given:
-
"Catalog" None database catalog to use "Schema" None database schema to use
范例
基本范例 (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.
Get all columns from tables whose names start with "SA":
Get all columns from a particular table: