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 "DatabaseLink`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.

SQLDataTypeNames returns a list of the data type names within a database.

SQLDataTypeInformation returns more complete information about the data types.

SQLDataTypeInformation takes a single option: "ShowColumnHeadings". This returns the column headings.

This closes the connection.

More information on working with data types is provided in "Data Type Mapping".