MATLAB DATABASE TOOLBOX RELEASE NOTES User's Guide Page 519

  • Download
  • Add to my manuals
  • Print
  • Page
    / 684
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 518
datainsert
7-89
datainsert
Export MATLAB data into database table
To export MATLAB data into a database, use these functions: datainsert,
fastinsert, and insert. For maximum performance, use datainsert. To use
datainsert, ensure that your input data is a cell array or numeric matrix with a
specific format. When your input data is a structure, dataset array, or table, or you
are using a native ODBC database connection, use fastinsert. If datainsert or
fastinsert do not work for you and you want to insert a small set of data, use insert.
For other differences among these functions, see “Inserting Data Using the Command
Line”.
Syntax
datainsert(conn,tablename,colnames,data)
Description
datainsert(conn,tablename,colnames,data) inserts data from the MATLAB
workspace into a database table.
Examples
Export MATLAB Cell Array Data
Establish the connection conn to a MySQL database with the user name username and
password pwd. This database contains the table inventoryTable with these columns:
productNumber
Quantity
Price
inventoryDate
Page view 518
1 2 ... 514 515 516 517 518 519 520 521 522 523 524 ... 683 684

Comments to this Manuals

No comments