MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 489

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 488
database.fetch
7-59
10 1
Import Two Columns of Data and View Information About the Data
Import the InvoiceNumber and Paid columns from the Invoice table in the
dbtoolboxdemo database.
conn = database('dbtoolboxdemo','','');
setdbprefs('DataReturnFormat','cellarray')
results = fetch(conn,['select InvoiceNumber, '...
'Paid from Invoice']);
View the size of the cell array into which the results were returned.
size(results)
ans =
12 2
View the results for the first row of data.
results(1,:)
ans =
[2101] [0]
View the data type of the second element in the first row of data.
class(results{1,2})
ans =
logical
“ Retrieve Image Data Types”
More About
Tips
You call the database.fetch function with fetch rather than database.fetch.
You implicitly call database.fetch by passing a database object, conn, to fetch.
The fetch function also works with a cursor object. See cursor.fetch.
Seitenansicht 488
1 2 ... 484 485 486 487 488 489 490 491 492 493 494 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare