User`s guide
datainsert
7-93
Data Types: char
colnames — Database table column names
cell array of strings
Database table column names, specified as a cell array of one or more strings to denote
the columns in the existing database table tablename.
Example: {'col1','col2','col3'}
Data Types: cell
data — Insert data
cell array | numeric matrix
Insert data, specified as a MATLAB cell array or numeric matrix. If data is a cell array
containing MATLAB dates, times, or timestamps, use this formatting:
• Dates must be date strings of the form yyyy-mm-dd.
• Times must be time strings of the form HH:MM:SS.
• Timestamps must be strings of the form yyyy-mm-dd HH:MM:SS.FFF.
Any null entries and any NaNs in the cell array must be converted to empty strings
before calling datainsert. MATLAB date numbers and NaNs are supported for insert
when data is a numeric matrix. Date numbers inserted into database date and time
columns convert to java.sql.Date. Any converted date and time data is accurately
converted back to the native database format in the target database upon insertion.
Data Types: double | cell
More About
• “Inserting Data Using the Command Line” on page 2-197
See Also
close | database | fastinsert | insert | update