Odbc Toolkit - connection.sqlwrite
- : sqlwrite
(db, tablename, data)
- : sqlwrite
(db, tablename, data, columntypes)
- : sqlwrite
(db, tablename, data, propertyname, propertyvalue …)
Insert rows of data into a table.
Insert rows of data into a database table. If the table does not exist it will be created, using the ColumnType property if available otherwise, the type of input data will be used to determine field types.
Inputs
- db
Previously created database connection object
- tablename
Name of table to write data to
- data
Table containing data to write to the database. Variables names are expected to match the database.
- columntypes
Optional cell array of same size as data used if table must be created. The column types may also be passed in using the propertyname, propertyvalue syntax.
- propertyname, propertyvalue
property name/value pairs where known properties are:
- ColumnType
Optional cell array of same size as the data that may be used if the table is created as part of the write operation.
Outputs
None
See also: database, odbc, sqlread.