SQLSelect
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.
Details and Options
- To use SQLSelect, you first need to load DatabaseLink using Needs["DatabaseLink`"].
- The following options can be given:
-
"Distinct" False whether to return only distinct results "FetchSize" Automatic JDBC driver hint for filling result sets "GetAsStrings" False whether to return the results as strings "MaxFieldSize" Automatic byte limit for variable-length column types "MaxRows" Automatic the maximum number of rows to return "ShowColumnHeadings" False whether to return headings with the results "SortingColumns" None how to sort the data "ColumnSymbols" None symbols to be associated with results "Timeout" $SQLTimeout the timeout for the query
Examples
open allclose allBasic Examples (1)
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.
Join data from multiple tables:
Select data matching a condition:
Options (8)
"FetchSize" (1)
The "FetchSize" option suggests to the JDBC driver a number of rows to fetch on each visit to the database. Increasing this parameter reduces the amount of network traffic required to execute a query, at the cost of memory used:
Compute memory in use, including both kernel and Java layers:
"MaxFieldSize" (1)
"ColumnSymbols" (1)
Supply a list of symbols for query results to be assigned to:
Supply a function to operate on column names and results. If column headings have not been requested, the first argument to the function will be Null: