MATLAB DATABASE TOOLBOX RELEASE NOTES Betriebsanweisung Seite 446

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 684
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 445
7 Functions — Alphabetical List
7-16
columnnames
Retrieve names of columns in fetched data set
Syntax
columnlist = columnnames(curs)
columnlist = columnnames(curs,returnCellArray)
Description
columnlist = columnnames(curs) returns the column names of the data selected
from a database table in the cursor object curs. The columnnames function is not
supported for a cursor object returned by the fetchmulti function.
columnlist = columnnames(curs,returnCellArray) returns the column names
as a cell array of strings when returnCellArray is set to true.
Examples
Return Column Names from the Selected Data
Create a database connection conn using the dbtoolboxdemo data source.
conn = database('dbtoolboxdemo','','');
Working with the dbtoolboxdemo data source, use fetch to import all data into
Database Cursor Object curs.
curs = exec(conn,'select * from suppliers');
curs = fetch(curs);
Return the column names in the suppliers table.
columnlist = columnnames(curs)
columnlist =
Seitenansicht 445
1 2 ... 441 442 443 444 445 446 447 448 449 450 451 ... 683 684

Kommentare zu diesen Handbüchern

Keine Kommentare