User`s guide

7 Functions — Alphabetical List
7-58
Output Arguments
results
A cell array, table, dataset array, structure, or numeric matrix depending on
specifications set by setdbprefs.
Examples
Import Data
Import the productDescription column from the productTable table in the
dbtoolboxdemo database.
conn = database('dbtoolboxdemo','','');
setdbprefs('DataReturnFormat','cellarray')
results = fetch(conn,'select productdescription from producttable')
results =
'Victorian Doll'
'Train Set'
'Engine Kit'
'Painting Set'
'Space Cruiser'
'Building Blocks'
'Tin Soldier'
'Sail Boat'
'Slinky'
'Teddy Bear'
If you experience speed and memory issues, use the fetchbatchsize argument.
View the size of the cell array into which the results were returned.
size(results)
ans =