insert(conn,tablename,colnames,data)
exports data from the MATLAB® workspace and inserts it into an existing database table by using the SQLite
database connection conn. You can specify the database table name and
column names, and specify the data to be inserted into the database.
SQLite database connection, specified as an sqlite object created using the sqlite
function.
tablename — Database table name character vector | string scalar
Database table name, specified as a character vector or string scalar denoting the name of a
table in the database.
Example: 'employees'
Data Types: char | string
colnames — Database table column names cell array of character vectors | string array
Database table column names, specified as a cell array of one or more character vectors or a
string array to denote the columns in the existing database table
tablename.
Example: {'col1','col2','col3'}
Data Types: cell | string
data — Insert data numeric matrix | structure | table | cell array
Insert data, specified as a numeric matrix, structure, table, or cell array.