This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Data Types

This tutorial discusses how to retrieve information about data types. When you create a table, you will need to refer to these data types.
If you find that the examples in this tutorial do not work as shown, you may need to install or restore the example database with the DatabaseExamples` package, as described in "Using the Example Databases".
SQLDataTypeNames[conn]list all data type names within a data source
SQLDataTypeInformation[conn]list all data type information within a data source

Functions for retrieving information about data types.

This loads DatabaseLink and connects to the demo database.
Click for copyable input
SQLDataTypeNames returns a list of the data type names within a database.
Click for copyable input
SQLDataTypeInformation returns more complete information about the data types.
Click for copyable input
SQLDataTypeInformation takes a single option: "ShowColumnHeadings". This returns the column headings.
Click for copyable input
This closes the connection.
Click for copyable input
More information on working with data types is provided in "Data Type Mapping".