MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 628

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 627
7 Functions — Alphabetical List
7-198
rows
Return number of rows in fetched data set
Syntax
numrows = rows(curs)
Description
numrows = rows(curs) returns the number of rows in the fetched data set curs.
Examples
Return the Number of Rows in the Cursor
After executing an SQL statement, return the number of rows in the database cursor
object generated by fetch.
Establish connection conn to a MySQL database with user name username and
password pwd.
conn = database('MySQL','username','pwd');
Execute a SELECT query on the productTable for product numbers 1 through 5
inclusive.
curs = exec(conn,['select * from productTable'...
' where productNumber >= 1 and productNumber <= 5']);
exec returns the database cursor object curs.
Fetch the data in curs.
curs = fetch(curs);
The Data property of curs contains the fetched data from the SELECT query.
Vedere la pagina 627
1 2 ... 623 624 625 626 627 628 629 630 631 632 633 ... 683 684

Commenti su questo manuale

Nessun commento