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.
Details and Options
- 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
Examples
Basic Examples (1)Summary of the most common use cases

https://wolfram.com/xid/0c3qvknck6aq878-cpgy6d
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://wolfram.com/xid/0c3qvknck6aq878-pko

https://wolfram.com/xid/0c3qvknck6aq878-mo8

Get all columns from tables whose names start with "SA":

https://wolfram.com/xid/0c3qvknck6aq878-biu

Get all columns from a particular table:

https://wolfram.com/xid/0c3qvknck6aq878-ft5


https://wolfram.com/xid/0c3qvknck6aq878-nuv

Get columns whose names begin with "V" from all tables:

https://wolfram.com/xid/0c3qvknck6aq878-n27


https://wolfram.com/xid/0c3qvknck6aq878-xo4526


https://wolfram.com/xid/0c3qvknck6aq878-c8c


https://wolfram.com/xid/0c3qvknck6aq878-n5l