MATLAB DATABASE TOOLBOX RELEASE NOTES Guide de l'utilisateur Page 671

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 684
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 670
update
7-241
update
Replace data in database table with MATLAB data
Syntax
update(conn,tablename,colnames,data,whereclause)
Description
update(conn,tablename,colnames,data,whereclause) exports the MATLAB
variable data in its current format into the database table tablename using the
database connection conn. Existing records in the database table are replaced as
specified by the SQL whereclause command.
Examples
Update an Existing Record
Create a database connection conn using the dbtoolboxdemo data source. This
database contains the table inventoryTable that contains these columns:
productNumber
Quantity
Price
inventoryDate
conn = database('dbtoolboxdemo','','');
Import all data from the inventoryTable using conn. Store the data in a cell
array contained in the cursor object property curs.Data. Display the data from
inventoryTable in this property.
curs = exec(conn,'select * from inventoryTable');
curs = fetch(curs);
Vue de la page 670
1 2 ... 666 667 668 669 670 671 672 673 674 675 676 ... 683 684

Commentaires sur ces manuels

Pas de commentaire