SQLColumnInformation
SQLColumnInformation[conn]
returns a list of information about the columns in an SQL connection.
SQLColumnInformation[conn,table]
returns a list pertaining to the columns in table.
SQLColumnInformation[conn,SQLTable[table]]
returns a list pertaining to the columns in table.
SQLColumnInformation[conn,{table,column}]
returns a list pertaining to the columns in table matching column.
SQLColumnInformation[conn,SQLColumn[{table,column}]]
returns a list pertaining to the columns in table matching column.
SQLColumnInformation[conn,SQLColumn[column]]
returns a list pertaining to the columns in any table matching column.
Details and Options
- To use SQLColumnInformation, 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 "ShowColumnHeadings" False whether to return headings with the results
Examples
Basic Examples (1)Summary of the most common use cases

https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-t0dnw
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/0hbngqf9h7oj54tkhw2-lho

https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-x9u

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

https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-hvw

Get information for all columns from a particular table:

https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-q6x


https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-wb6

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

https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-xb6


https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-6ztl12


https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-lj9


https://wolfram.com/xid/0hbngqf9h7oj54tkhw2-uyo
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.