MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 432

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 431
7 Functions — Alphabetical List
7-2
attr
Retrieve attributes of columns in fetched data set
Syntax
attributes = attr(curs)
attributes = attr(curs,colnum)
Description
attributes = attr(curs) retrieves attribute information for all columns in the
fetched data set curs.
attributes = attr(curs,colnum) retrieves attribute information for the column
number colnum in the fetched data set curs.
Examples
Retrieve Attribute Data for a Fetched Data Set
Connect to an Oracle database using an ODBC connection. This code assumes that
you are connecting a data source named dbname with user name username and
password pwd. The data source identifies an Oracle database that contains the table
inventoryTable with these columns: productNumber, Quantity, Price, and
inventoryDate.
conn = database(dbname,username,pwd);
Fetch all the data from the table inventoryTable into a fetched data set curs.
curs = exec(conn,'select * from inventoryTable');
curs = fetch(curs);
Retrieve attribute information for all the fetched data curs.
attributes = attr(curs)
Vedere la pagina 431
1 2 ... 427 428 429 430 431 432 433 434 435 436 437 ... 683 684

Commenti su questo manuale

Nessun commento