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


SQLSelect[conn, table]
extracts data from a table in an SQL connection.
SQLSelect[conn, table, cols]
extracts data from particular columns.
SQLSelect[conn, table, cols, cond]
only extracts data that matches cond.
  • To use SQLSelect, you first need to load DatabaseLink using Needs["DatabaseLink`"].
  • The following options can be given:
"Distinct"Falsewhether to return only distinct results
"GetAsStrings"Falsewhether to return the results as strings
"MaxRows"Automaticthe maximum number of rows to return
"ShowColumnHeadings"Falsewhether to return headings with the results
"SortingColumns"Nonehow to sort the data
"Timeout"Nonethe timeout for the query
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 DatabaseExamples` package, as described in Using the Example Databases.