User`s guide
database.fetch
7-57
database.fetch
Execute SQL statement to import data into MATLAB workspace
Syntax
results = fetch(conn,sqlquery)
results = fetch(conn,sqlquery,fetchbatchsize)
Description
results = fetch(conn,sqlquery) executes the SQL statement sqlquery, imports
data for the open connection object conn, and returns the data to results. (For details
about SQL statements, see exec.)
results = fetch(conn,sqlquery,fetchbatchsize) imports fetchbatchsize
rows of data at a time.
Input Arguments
conn
A database connection object.
sqlquery
An SQL statement.
fetchbatchsize
Specifies the number of rows of data to import at a time. Use fetchbatchsize
when importing large amounts of data. Retrieving data in increments, as specified
by fetchbatchsize, helps reduce overall retrieval time. If fetchbatchsize is not
provided, a default value of FetchBatchSize is used. FetchBatchSize is set using
setdbprefs.